diff --git a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource1D.cs b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture1D.cs similarity index 86% rename from src/ComputeSharp.D2D1/Resources/D2D1TextureResource1D.cs rename to src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture1D.cs index 4483436b..33b49698 100644 --- a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource1D.cs +++ b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture1D.cs @@ -7,25 +7,25 @@ namespace ComputeSharp.D2D1; /// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them. /// [AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)] -public readonly struct D2D1TextureResource1D +public readonly struct D2D1ResourceTexture1D { /// /// Gets the width of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource1D)}.{nameof(Width)}"); + public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture1D)}.{nameof(Width)}"); /// /// Gets a single value from the current readonly texture. /// /// The horizontal offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[int x] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(int)}]"); + public ref readonly Float4 this[int x] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(int)}]"); /// /// Gets a single value from the current readonly texture with linear sampling. /// /// The horizontal normalized offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[float u] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(float)}]"); + public ref readonly Float4 this[float u] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(float)}]"); } diff --git a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource2D.cs b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture2D.cs similarity index 86% rename from src/ComputeSharp.D2D1/Resources/D2D1TextureResource2D.cs rename to src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture2D.cs index 4c7289f8..c35bfbbb 100644 --- a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource2D.cs +++ b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture2D.cs @@ -7,19 +7,19 @@ namespace ComputeSharp.D2D1; /// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them. /// [AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)] -public readonly struct D2D1TextureResource2D +public readonly struct D2D1ResourceTexture2D { /// /// Gets the width of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}.{nameof(Width)}"); + public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}.{nameof(Width)}"); /// /// Gets the height of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Height => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}.{nameof(Height)}"); + public int Height => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}.{nameof(Height)}"); /// /// Gets a single value from the current readonly texture. @@ -27,14 +27,14 @@ public readonly struct D2D1TextureResource2D /// The horizontal offset of the value to get. /// The vertical offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(int)}, {typeof(int)}]"); + public ref readonly Float4 this[int x, int y] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(int)}, {typeof(int)}]"); /// /// Gets a single value from the current readonly texture. /// /// The coordinates of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(Int2)}]"); + public ref readonly Float4 this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(Int2)}]"); /// /// Gets a single value from the current readonly texture with linear sampling. @@ -42,12 +42,12 @@ public readonly struct D2D1TextureResource2D /// The horizontal normalized offset of the value to get. /// The vertical normalized offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[float u, float v] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(float)}, {typeof(float)}]"); + public ref readonly Float4 this[float u, float v] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(float)}, {typeof(float)}]"); /// /// Gets a single value from the current readonly texture with linear sampling. /// /// The normalized coordinates of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[Float2 uv] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource2D)}[{typeof(Float2)}]"); + public ref readonly Float4 this[Float2 uv] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture2D)}[{typeof(Float2)}]"); } diff --git a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource3D.cs b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture3D.cs similarity index 84% rename from src/ComputeSharp.D2D1/Resources/D2D1TextureResource3D.cs rename to src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture3D.cs index 788df66a..ff927558 100644 --- a/src/ComputeSharp.D2D1/Resources/D2D1TextureResource3D.cs +++ b/src/ComputeSharp.D2D1/Resources/D2D1ResourceTexture3D.cs @@ -7,25 +7,25 @@ namespace ComputeSharp.D2D1; /// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them. /// [AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)] -public readonly struct D2D1TextureResource3D +public readonly struct D2D1ResourceTexture3D { /// /// Gets the width of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}.{nameof(Width)}"); + public int Width => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}.{nameof(Width)}"); /// /// Gets the height of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Height => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}.{nameof(Height)}"); + public int Height => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}.{nameof(Height)}"); /// /// Gets the depth of the current texture. /// /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public int Depth => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}.{nameof(Depth)}"); + public int Depth => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}.{nameof(Depth)}"); /// /// Gets a single value from the current readonly texture. @@ -34,14 +34,14 @@ public readonly struct D2D1TextureResource3D /// The vertical offset of the value to get. /// The depthwise offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]"); + public ref readonly Float4 this[int x, int y, int z] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}[{typeof(int)}, {typeof(int)}, {typeof(int)}]"); /// /// Gets a single value from the current readonly texture. /// /// The coordinates of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}[{typeof(Int3)}]"); + public ref readonly Float4 this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}[{typeof(Int3)}]"); /// /// Gets a single value from the current readonly texture with linear sampling. @@ -50,12 +50,12 @@ public readonly struct D2D1TextureResource3D /// The vertical normalized offset of the value to get. /// The depthwise offset of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[float u, float v, float w] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}[{typeof(float)}, {typeof(float)}, {typeof(float)}]"); + public ref readonly Float4 this[float u, float v, float w] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}[{typeof(float)}, {typeof(float)}, {typeof(float)}]"); /// /// Gets a single value from the current readonly texture with linear sampling. /// /// The normalized coordinates of the value to get. /// This API can only be used from a compute shader, and will always throw if used anywhere else. - public ref readonly Float4 this[Float3 uvw] => throw new InvalidExecutionContextException($"{typeof(D2D1TextureResource3D)}[{typeof(Float3)}]"); + public ref readonly Float4 this[Float3 uvw] => throw new InvalidExecutionContextException($"{typeof(D2D1ResourceTexture3D)}[{typeof(Float3)}]"); }