Added BufferDebugView2D<T> type
このコミットが含まれているのは:
1 親
2a38143801
コミット
70a8b095b0
3ファイル変更
+32
検索条件に一致するファイルはありません
@@ -3,6 +3,7 @@ using ComputeSharp.Exceptions;
|
||||
using ComputeSharp.Graphics;
|
||||
using ComputeSharp.Graphics.Buffers.Abstract;
|
||||
using ComputeSharp.Graphics.Buffers.Enums;
|
||||
using ComputeSharp.Graphics.Buffers.Views;
|
||||
|
||||
namespace ComputeSharp
|
||||
{
|
||||
@@ -10,6 +11,7 @@ namespace ComputeSharp
|
||||
/// A <see langword="class"/> representing a typed readonly 2D texture stored on GPU memory.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of items stored on the texture.</typeparam>
|
||||
[DebuggerTypeProxy(typeof(BufferDebugView2D<>))]
|
||||
[DebuggerDisplay("{ToString(),raw}")]
|
||||
public sealed class ReadOnlyTexture2D<T> : Texture2D<T>
|
||||
where T : unmanaged
|
||||
|
||||
@@ -3,6 +3,7 @@ using ComputeSharp.Exceptions;
|
||||
using ComputeSharp.Graphics;
|
||||
using ComputeSharp.Graphics.Buffers.Abstract;
|
||||
using ComputeSharp.Graphics.Buffers.Enums;
|
||||
using ComputeSharp.Graphics.Buffers.Views;
|
||||
|
||||
namespace ComputeSharp
|
||||
{
|
||||
@@ -10,6 +11,7 @@ namespace ComputeSharp
|
||||
/// A <see langword="class"/> representing a typed read write 2D texture stored on GPU memory.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of items stored on the texture.</typeparam>
|
||||
[DebuggerTypeProxy(typeof(BufferDebugView2D<>))]
|
||||
[DebuggerDisplay("{ToString(),raw}")]
|
||||
public sealed class ReadWriteTexture2D<T> : Texture2D<T>
|
||||
where T : unmanaged
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Diagnostics;
|
||||
using ComputeSharp.Graphics.Buffers.Abstract;
|
||||
|
||||
namespace ComputeSharp.Graphics.Buffers.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// A debug proxy used to display items in a <see cref="Texture2D{T}"/> instance.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of items to display.</typeparam>
|
||||
internal sealed class BufferDebugView2D<T>
|
||||
where T : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BufferDebugView2D{T}"/> class with the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="texture">The input <see cref="Texture2D{T}"/> instance with the items to display.</param>
|
||||
public BufferDebugView2D(Texture2D<T>? texture)
|
||||
{
|
||||
Items = texture?.GetData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the items to display for the current instance.
|
||||
/// </summary>
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Collapsed)]
|
||||
public T[,]? Items { get; }
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする