diff --git a/.gitignore b/.gitignore index b266c367..0d7a3e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ bld/ [Oo]bj/ [Ll]og/ +# Debug view types +!**/Resources/Debug + # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot diff --git a/src/ComputeSharp.Graphics/Resources/Debug/TransferTexture3DDebugView{T}.cs b/src/ComputeSharp.Graphics/Resources/Debug/TransferTexture3DDebugView{T}.cs new file mode 100644 index 00000000..213a0845 --- /dev/null +++ b/src/ComputeSharp.Graphics/Resources/Debug/TransferTexture3DDebugView{T}.cs @@ -0,0 +1,27 @@ +using System.Diagnostics; + +namespace ComputeSharp.Resources.Debug +{ + /// + /// A debug proxy used to display items in a instance. + /// + /// The type of items to display. + internal sealed class TransferTexture3DDebugView + where T : unmanaged + { + /// + /// Initializes a new instance of the class with the specified parameters. + /// + /// The input instance with the items to display. + public TransferTexture3DDebugView(TransferTexture3D? texture) + { + Items = texture?.View.ToArray(); + } + + /// + /// Gets the items to display for the current instance. + /// + [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] + public T[,,]? Items { get; } + } +}