diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter.cs
index dfc2c329..3999b1d9 100644
--- a/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter.cs
+++ b/src/ComputeSharp.D2D1/Shaders/Interop/Buffers/ArrayPoolBinaryWriter.cs
@@ -46,6 +46,7 @@ internal ref struct ArrayPoolBinaryWriter
///
/// Gets the data written to the underlying buffer so far, as a .
///
+ [UnscopedRef]
public ReadOnlySpan WrittenSpan
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -67,7 +68,7 @@ internal ref struct ArrayPoolBinaryWriter
///
/// The type of value to write.
/// The value to write.
- public unsafe void Write(in T value)
+ public unsafe void Write(scoped in T value)
where T : unmanaged
{
Span span = GetSpan(sizeof(T));