Updated buffer types to implement the new architecture
このコミットが含まれているのは:
1 親
a68ad24929
コミット
12198f9943
3ファイル変更
+62
-88
検索条件に一致するファイルはありません
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using ComputeSharp.Graphics.Buffers.Abstract;
|
||||
using SharpDX.Direct3D12;
|
||||
|
||||
namespace ComputeSharp.Graphics.Buffers
|
||||
@@ -7,14 +9,17 @@ namespace ComputeSharp.Graphics.Buffers
|
||||
/// A <see langword="class"/> representing a typed read write buffer stored on GPU memory
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of items stored on the buffer</typeparam>
|
||||
public sealed class ReadWriteBuffer<T> : Buffer<T> where T : unmanaged
|
||||
public sealed class ReadWriteBuffer<T> : HlslBuffer<T> where T : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ReadWriteBuffer{T}"/> instance with the specified parameters
|
||||
/// </summary>
|
||||
/// <param name="device">The <see cref="GraphicsDevice"/> associated with the current instance</param>
|
||||
/// <param name="size">The number of items to store in the current buffer</param>
|
||||
internal ReadWriteBuffer(GraphicsDevice device, int size) : base(device, size, HeapType.Default) { }
|
||||
internal ReadWriteBuffer(GraphicsDevice device, int size) : base(device, size, size * Unsafe.SizeOf<T>(), HeapType.Default)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a single <typeparamref name="T"/> value from the current read write buffer
|
||||
@@ -26,5 +31,17 @@ namespace ComputeSharp.Graphics.Buffers
|
||||
get => throw new InvalidOperationException("The indexer APIs can only be used from a compute shader");
|
||||
set => throw new InvalidOperationException("The indexer APIs can only be used from a compute shader");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void GetData(Span<T> span)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void SetData(Span<T> span)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする