diff --git a/src/ComputeSharp.Pix/ComputeContextExtensions.cs b/src/ComputeSharp.Pix/ComputeContextExtensions.cs
index fb9b5abf..f719447c 100644
--- a/src/ComputeSharp.Pix/ComputeContextExtensions.cs
+++ b/src/ComputeSharp.Pix/ComputeContextExtensions.cs
@@ -18,7 +18,7 @@ public static class ComputeContextExtensions
/// The color to use for the event (the alpha channel will be ignored).
/// The message to use for the event.
[Conditional("USE_PIX")]
- public static unsafe void BeginEvent(this in ComputeContext context, Color color, string message)
+ public static unsafe void BeginEvent(this ref readonly ComputeContext context, Color color, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -35,7 +35,7 @@ public static class ComputeContextExtensions
/// The index to identify the group this event belongs to (PIX will choose a color to represent all entries in the group).
/// The message to use for the event.
[Conditional("USE_PIX")]
- public static unsafe void BeginEvent(this in ComputeContext context, byte index, string message)
+ public static unsafe void BeginEvent(this ref readonly ComputeContext context, byte index, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -50,7 +50,7 @@ public static class ComputeContextExtensions
/// The to use to start the PIX event.
/// The message to use for the event.
[Conditional("USE_PIX")]
- public static unsafe void BeginEvent(this in ComputeContext context, string message)
+ public static unsafe void BeginEvent(this ref readonly ComputeContext context, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -76,7 +76,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void BeginEventUnsafe(this in ComputeContext context, Color color, ReadOnlySpan message)
+ public static unsafe void BeginEventUnsafe(this ref readonly ComputeContext context, Color color, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -105,7 +105,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void BeginEventUnsafe(this in ComputeContext context, byte index, ReadOnlySpan message)
+ public static unsafe void BeginEventUnsafe(this ref readonly ComputeContext context, byte index, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -132,7 +132,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void BeginEventUnsafe(this in ComputeContext context, ReadOnlySpan message)
+ public static unsafe void BeginEventUnsafe(this ref readonly ComputeContext context, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -144,7 +144,7 @@ public static class ComputeContextExtensions
///
/// The to use to end the PIX event.
[Conditional("USE_PIX")]
- public static unsafe void EndEvent(this in ComputeContext context)
+ public static unsafe void EndEvent(this ref readonly ComputeContext context)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -158,7 +158,7 @@ public static class ComputeContextExtensions
/// The color to use for the log (the alpha channel will be ignored).
/// The message to use for the marker.
[Conditional("USE_PIX")]
- public static unsafe void Log(this in ComputeContext context, Color color, string message)
+ public static unsafe void Log(this ref readonly ComputeContext context, Color color, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -175,7 +175,7 @@ public static class ComputeContextExtensions
/// The index to identify the group this log belongs to (PIX will choose a color to represent all entries in the group).
/// The message to use for the marker.
[Conditional("USE_PIX")]
- public static unsafe void Log(this in ComputeContext context, byte index, string message)
+ public static unsafe void Log(this ref readonly ComputeContext context, byte index, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -190,7 +190,7 @@ public static class ComputeContextExtensions
/// The to use to insert the PIX marker.
/// The message to use for the marker.
[Conditional("USE_PIX")]
- public static unsafe void Log(this in ComputeContext context, string message)
+ public static unsafe void Log(this ref readonly ComputeContext context, string message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -216,7 +216,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void LogUnsafe(this in ComputeContext context, Color color, ReadOnlySpan message)
+ public static unsafe void LogUnsafe(this ref readonly ComputeContext context, Color color, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -245,7 +245,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void LogUnsafe(this in ComputeContext context, byte index, ReadOnlySpan message)
+ public static unsafe void LogUnsafe(this ref readonly ComputeContext context, byte index, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
@@ -272,7 +272,7 @@ public static class ComputeContextExtensions
///
///
[Conditional("USE_PIX")]
- public static unsafe void LogUnsafe(this in ComputeContext context, ReadOnlySpan message)
+ public static unsafe void LogUnsafe(this ref readonly ComputeContext context, ReadOnlySpan message)
{
ref CommandList commandList = ref context.GetCommandList(pipelineState: null);
diff --git a/src/ComputeSharp.SourceGeneration/Extensions/ITypeSymbolExtensions.cs b/src/ComputeSharp.SourceGeneration/Extensions/ITypeSymbolExtensions.cs
index 2169baa3..9eaf22f8 100644
--- a/src/ComputeSharp.SourceGeneration/Extensions/ITypeSymbolExtensions.cs
+++ b/src/ComputeSharp.SourceGeneration/Extensions/ITypeSymbolExtensions.cs
@@ -62,9 +62,9 @@ internal static class ITypeSymbolExtensions
///
/// The input instance.
/// The target instance.
- public static void AppendFullyQualifiedMetadataName(this ITypeSymbol symbol, in ImmutableArrayBuilder builder)
+ public static void AppendFullyQualifiedMetadataName(this ITypeSymbol symbol, ref readonly ImmutableArrayBuilder builder)
{
- static void BuildFrom(ISymbol? symbol, in ImmutableArrayBuilder builder)
+ static void BuildFrom(ISymbol? symbol, ref readonly ImmutableArrayBuilder builder)
{
switch (symbol)
{
diff --git a/src/ComputeSharp/Attributes/Enums/DefaultThreadGroupSizes.cs b/src/ComputeSharp/Attributes/Enums/DefaultThreadGroupSizes.cs
index fec96df0..8bb5b55f 100644
--- a/src/ComputeSharp/Attributes/Enums/DefaultThreadGroupSizes.cs
+++ b/src/ComputeSharp/Attributes/Enums/DefaultThreadGroupSizes.cs
@@ -12,7 +12,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch only along the X axis.
///
///
- /// This applies to using or .
+ /// This applies to using or .
///
X = 1 << 0,
@@ -20,7 +20,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch only along the Y axis.
///
///
- /// This applies to using or ,
+ /// This applies to using or ,
/// but only as long as the input dispatch size on both the X and Z axes is 1. Using any other combination will not be able to leverage the precompiled shader bytecode.
///
Y = 1 << 1,
@@ -29,7 +29,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch only along the Z axis.
///
///
- /// This applies to using or ,
+ /// This applies to using or ,
/// but only as long as the input dispatch size on both the X and Y axes is 1. Using any other combination will not be able to leverage the precompiled shader bytecode.
///
Z = 1 << 2,
@@ -39,8 +39,8 @@ public enum DefaultThreadGroupSizes
///
///
/// This applies to using , ,
- /// , ,
- /// or .
+ /// , ,
+ /// or .
///
XY = X | Y,
@@ -48,7 +48,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch along the X and Z axes.
///
///
- /// This applies to using or ,
+ /// This applies to using or ,
/// but only as long as the input dispatch size on the Y axis 1. Using any other combination will not be able to leverage the precompiled shader bytecode.
///
XZ = X | Z,
@@ -57,7 +57,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch along the Y and Z axes.
///
///
- /// This applies to using or ,
+ /// This applies to using or ,
/// but only as long as the input dispatch size on the X axis 1. Using any other combination will not be able to leverage the precompiled shader bytecode.
///
YZ = Y | Z,
@@ -66,7 +66,7 @@ public enum DefaultThreadGroupSizes
/// Indicates a shader dispatch along the X, Y and Z axes.
///
///
- /// This applies to using or .
+ /// This applies to using or .
///
XYZ = X | Y | Z
}
\ No newline at end of file
diff --git a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture1DExtensions.cs b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture1DExtensions.cs
index bd75f279..8fe9e908 100644
--- a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture1DExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture1DExtensions.cs
@@ -16,7 +16,7 @@ public static class ReadWriteTexture1DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -42,7 +42,7 @@ public static class ReadWriteTexture1DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -68,7 +68,7 @@ public static class ReadWriteTexture1DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -94,7 +94,7 @@ public static class ReadWriteTexture1DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -122,7 +122,7 @@ public static class ReadWriteTexture1DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
diff --git a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture2DExtensions.cs b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture2DExtensions.cs
index 163e88d3..54f01d3c 100644
--- a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture2DExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture2DExtensions.cs
@@ -16,7 +16,7 @@ public static class ReadWriteTexture2DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -42,7 +42,7 @@ public static class ReadWriteTexture2DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -68,7 +68,7 @@ public static class ReadWriteTexture2DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -94,7 +94,7 @@ public static class ReadWriteTexture2DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -122,7 +122,7 @@ public static class ReadWriteTexture2DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
diff --git a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture3DExtensions.cs b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture3DExtensions.cs
index ca96756c..1acd9d92 100644
--- a/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture3DExtensions.cs
+++ b/src/ComputeSharp/Graphics/Extensions/ReadWriteTexture3DExtensions.cs
@@ -16,7 +16,7 @@ public static class ReadWriteTexture3DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -42,7 +42,7 @@ public static class ReadWriteTexture3DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -68,7 +68,7 @@ public static class ReadWriteTexture3DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -94,7 +94,7 @@ public static class ReadWriteTexture3DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
@@ -122,7 +122,7 @@ public static class ReadWriteTexture3DExtensions
/// The returned instance can be used in a shader to enable texture sampling.
///
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
- /// use ,
+ /// use ,
/// and specify . After that, this method can be used to get a readonly wrapper for
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
/// being dispatched through that same , as it will not work if the texture changes state later on.
diff --git a/src/ComputeSharp/Imaging/Interfaces/IPixel{T,TPixel}.cs b/src/ComputeSharp/Imaging/Interfaces/IPixel{T,TPixel}.cs
index bf2e808a..614dc51c 100644
--- a/src/ComputeSharp/Imaging/Interfaces/IPixel{T,TPixel}.cs
+++ b/src/ComputeSharp/Imaging/Interfaces/IPixel{T,TPixel}.cs
@@ -16,8 +16,8 @@ public interface IPixel
/// The representation for the current value.
///
/// This method is primarily meant to be used to support
- ///
- /// and .
+ ///
+ /// and .
///
TPixel ToPixel();
}
\ No newline at end of file
diff --git a/src/ComputeSharp/Shaders/Extensions/ComputeContextExtensions.cs b/src/ComputeSharp/Shaders/Extensions/ComputeContextExtensions.cs
index be26aeca..2683698b 100644
--- a/src/ComputeSharp/Shaders/Extensions/ComputeContextExtensions.cs
+++ b/src/ComputeSharp/Shaders/Extensions/ComputeContextExtensions.cs
@@ -19,7 +19,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the buffer.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteBuffer buffer)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteBuffer buffer)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(buffer);
@@ -35,7 +35,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture1D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture1D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -51,7 +51,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture2D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture2D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -67,7 +67,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture3D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture3D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -84,7 +84,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture1D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture1D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -102,7 +102,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture2D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture2D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -120,7 +120,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, ReadWriteTexture3D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, ReadWriteTexture3D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -137,7 +137,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, IReadWriteNormalizedTexture1D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, IReadWriteNormalizedTexture1D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -153,7 +153,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, IReadWriteNormalizedTexture2D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, IReadWriteNormalizedTexture2D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -169,7 +169,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to insert the resource barrier.
/// The input instance to insert the barrier for.
- public static unsafe void Barrier(this in ComputeContext context, IReadWriteNormalizedTexture3D texture)
+ public static unsafe void Barrier(this ref readonly ComputeContext context, IReadWriteNormalizedTexture3D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -185,7 +185,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the buffer.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteBuffer buffer)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteBuffer buffer)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(buffer);
@@ -201,7 +201,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture1D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture1D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -217,7 +217,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture2D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture2D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -233,7 +233,7 @@ public static class ComputeContextExtensions
/// The type of items stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture3D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture3D texture)
where T : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -250,7 +250,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture1D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture1D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -268,7 +268,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture2D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture2D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -286,7 +286,7 @@ public static class ComputeContextExtensions
/// The type of pixels used on the GPU side.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, ReadWriteTexture3D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, ReadWriteTexture3D texture)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -303,7 +303,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, IReadWriteNormalizedTexture1D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, IReadWriteNormalizedTexture1D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -321,7 +321,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, IReadWriteNormalizedTexture2D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, IReadWriteNormalizedTexture2D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -339,7 +339,7 @@ public static class ComputeContextExtensions
/// The type of pixels stored on the texture.
/// The to use to clear the resource.
/// The input instance to clear.
- public static unsafe void Clear(this in ComputeContext context, IReadWriteNormalizedTexture3D texture)
+ public static unsafe void Clear(this ref readonly ComputeContext context, IReadWriteNormalizedTexture3D texture)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -359,7 +359,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, ReadWriteTexture1D texture, T value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, ReadWriteTexture1D texture, T value)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -378,7 +378,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, ReadWriteTexture2D texture, T value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, ReadWriteTexture2D texture, T value)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -397,7 +397,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, ReadWriteTexture3D texture, T value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, ReadWriteTexture3D texture, T value)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -415,7 +415,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, IReadWriteNormalizedTexture1D texture, TPixel value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, IReadWriteNormalizedTexture1D texture, TPixel value)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -438,7 +438,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, IReadWriteNormalizedTexture2D texture, TPixel value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, IReadWriteNormalizedTexture2D texture, TPixel value)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -461,7 +461,7 @@ public static class ComputeContextExtensions
/// The to use to fill the resource.
/// The input instance to fill.
/// The value to use to fill .
- public static unsafe void Fill(this in ComputeContext context, IReadWriteNormalizedTexture3D texture, TPixel value)
+ public static unsafe void Fill(this ref readonly ComputeContext context, IReadWriteNormalizedTexture3D texture, TPixel value)
where TPixel : unmanaged
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -484,7 +484,7 @@ public static class ComputeContextExtensions
/// The to use to run the shader.
/// The number of iterations to run on the X axis.
/// The input instance representing the compute shader to run.
- public static void For(this in ComputeContext context, int x, in T shader)
+ public static void For(this ref readonly ComputeContext context, int x, in T shader)
where T : struct, IComputeShader, IComputeShaderDescriptor
{
context.Run(x, in shader);
@@ -498,7 +498,7 @@ public static class ComputeContextExtensions
/// The number of iterations to run on the X axis.
/// The number of iterations to run on the Y axis.
/// The input instance representing the compute shader to run.
- public static void For(this in ComputeContext context, int x, int y, in T shader)
+ public static void For(this ref readonly ComputeContext context, int x, int y, in T shader)
where T : struct, IComputeShader, IComputeShaderDescriptor
{
context.Run(x, y, in shader);
@@ -513,7 +513,7 @@ public static class ComputeContextExtensions
/// The number of iterations to run on the Y axis.
/// The number of iterations to run on the Z axis.
/// The input instance representing the compute shader to run.
- public static void For(this in ComputeContext context, int x, int y, int z, in T shader)
+ public static void For(this ref readonly ComputeContext context, int x, int y, int z, in T shader)
where T : struct, IComputeShader, IComputeShaderDescriptor
{
context.Run(x, y, z, in shader);
@@ -526,7 +526,7 @@ public static class ComputeContextExtensions
/// The type of pixels being processed by the shader.
/// The to use to run the shader.
/// The target texture to apply the pixel shader to.
- public static void ForEach(this in ComputeContext context, IReadWriteNormalizedTexture2D texture)
+ public static void ForEach(this ref readonly ComputeContext context, IReadWriteNormalizedTexture2D texture)
where T : struct, IComputeShader, IComputeShaderDescriptor
where TPixel : unmanaged
{
@@ -543,7 +543,7 @@ public static class ComputeContextExtensions
/// The to use to run the shader.
/// The target texture to apply the pixel shader to.
/// The input instance representing the pixel shader to run.
- public static void ForEach(this in ComputeContext context, IReadWriteNormalizedTexture2D texture, in T shader)
+ public static void ForEach(this ref readonly ComputeContext context, IReadWriteNormalizedTexture2D texture, in T shader)
where T : struct, IComputeShader, IComputeShaderDescriptor
where TPixel : unmanaged
{
@@ -558,7 +558,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -575,7 +575,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -592,7 +592,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -609,7 +609,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -628,7 +628,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture1D texture, ResourceState resourceState)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -647,7 +647,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -664,7 +664,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -681,7 +681,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -698,7 +698,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -717,7 +717,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture2D texture, ResourceState resourceState)
where T : unmanaged, IPixel
where TPixel : unmanaged
{
@@ -736,7 +736,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -753,7 +753,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -770,7 +770,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -787,7 +787,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
{
default(ArgumentNullException).ThrowIfNull(texture);
@@ -806,7 +806,7 @@ public static class ComputeContextExtensions
/// The to use to transition the resource.
/// The input instance to transition.
/// The state to transition the input resource to.
- public static unsafe void Transition(this in ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
+ public static unsafe void Transition(this ref readonly ComputeContext context, ReadWriteTexture3D texture, ResourceState resourceState)
where T : unmanaged, IPixel
where TPixel : unmanaged
{