Fixed slowdown when getting data from buffers
このコミットが含まれているのは:
1 親
148bf60757
コミット
c0a45971bd
2ファイル変更
+2
-2
検索条件に一致するファイルはありません
@@ -24,7 +24,7 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
|
||||
/// <inheritdoc/>
|
||||
public override void GetData(Span<T> span, int offset, int count)
|
||||
{
|
||||
using Buffer<T> transferBuffer = new Buffer<T>(GraphicsDevice, count, count * ElementSizeInBytes, BufferType.Transfer);
|
||||
using Buffer<T> transferBuffer = new Buffer<T>(GraphicsDevice, count, count * ElementSizeInBytes, BufferType.ReadBack);
|
||||
using CommandList copyCommandList = new CommandList(GraphicsDevice, CommandListType.Copy);
|
||||
|
||||
copyCommandList.CopyBufferRegion(this, offset * ElementSizeInBytes, transferBuffer, 0, count * ElementSizeInBytes);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする