From da339566cca5b88371f689fb0b27cecb85e512a2 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 6 Jan 2021 18:14:37 +0100 Subject: [PATCH] Added size properties to texture interfaces --- .../Interfaces/IReadOnlyTexture2D{TPixel}.cs | 10 ++++++++++ .../Interfaces/IReadOnlyTexture3D{TPixel}.cs | 15 +++++++++++++++ .../Interfaces/IReadWriteTexture2D{TPixel}.cs | 10 ++++++++++ .../Interfaces/IReadWriteTexture3D{TPixel}.cs | 15 +++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture2D{TPixel}.cs b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture2D{TPixel}.cs index b03ba5c9..e2d18faf 100644 --- a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture2D{TPixel}.cs +++ b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture2D{TPixel}.cs @@ -8,6 +8,16 @@ public interface IReadOnlyTexture2D where TPixel : unmanaged { + /// + /// Gets the width of the current texture. + /// + public int Width { get; } + + /// + /// Gets the height of the current texture. + /// + public int Height { get; } + /// /// Gets a single value from the current readonly texture. /// diff --git a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs index a718f10f..df101b43 100644 --- a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs +++ b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadOnlyTexture3D{TPixel}.cs @@ -8,6 +8,21 @@ public interface IReadOnlyTexture3D where TPixel : unmanaged { + /// + /// Gets the width of the current texture. + /// + public int Width { get; } + + /// + /// Gets the height of the current texture. + /// + public int Height { get; } + + /// + /// Gets the depth of the current texture. + /// + public int Depth { get; } + /// /// Gets a single value from the current readonly texture. /// diff --git a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture2D{TPixel}.cs b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture2D{TPixel}.cs index 62cd23f9..dede8cfb 100644 --- a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture2D{TPixel}.cs +++ b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture2D{TPixel}.cs @@ -8,6 +8,16 @@ public interface IReadWriteTexture2D where TPixel : unmanaged { + /// + /// Gets the width of the current texture. + /// + public int Width { get; } + + /// + /// Gets the height of the current texture. + /// + public int Height { get; } + /// /// Gets a single value from the current writeable texture. /// diff --git a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture3D{TPixel}.cs b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture3D{TPixel}.cs index 7e04187e..6bbfb12a 100644 --- a/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture3D{TPixel}.cs +++ b/src/ComputeSharp.Graphics/Resources/Interfaces/IReadWriteTexture3D{TPixel}.cs @@ -8,6 +8,21 @@ public interface IReadWriteTexture3D where TPixel : unmanaged { + /// + /// Gets the width of the current texture. + /// + public int Width { get; } + + /// + /// Gets the height of the current texture. + /// + public int Height { get; } + + /// + /// Gets the depth of the current texture. + /// + public int Depth { get; } + /// /// Gets a single value from the current writeable texture. ///