aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-10-25 17:23:42 -0300
committerGitHub <noreply@github.com>2020-10-25 17:23:42 -0300
commit812e32f7753d452f5c6776fa18e2b2a26b4ff3bb (patch)
tree4dd4c085b5e20686dbc80d14b04024108909800d /Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
parentcf0f0fc4e740c774eadaa328dc543ee9a03fbd09 (diff)
Fix transform feedback errors caused by host pause/resume and multiple uses (#1634)
* Fix transform feedback errors caused by host pause/resume * Fix TFB being used as something else issue with copies * This is supposed to be StreamCopy
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/BufferManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/BufferManager.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
index ee1be74b..eec545b9 100644
--- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
@@ -587,21 +587,22 @@ namespace Ryujinx.Graphics.Gpu.Memory
{
_transformFeedbackBuffersDirty = false;
+ Span<BufferRange> tfbs = stackalloc BufferRange[Constants.TotalTransformFeedbackBuffers];
+
for (int index = 0; index < Constants.TotalTransformFeedbackBuffers; index++)
{
BufferBounds tfb = _transformFeedbackBuffers[index];
if (tfb.Address == 0)
{
- _context.Renderer.Pipeline.SetTransformFeedbackBuffer(index, new BufferRange(BufferHandle.Null, 0, 0));
-
+ tfbs[index] = BufferRange.Empty;
continue;
}
- BufferRange buffer = GetBufferRange(tfb.Address, tfb.Size);
-
- _context.Renderer.Pipeline.SetTransformFeedbackBuffer(index, buffer);
+ tfbs[index] = GetBufferRange(tfb.Address, tfb.Size);
}
+
+ _context.Renderer.Pipeline.SetTransformFeedbackBuffers(tfbs);
}
else
{