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
This commit is contained in:
parent
cf0f0fc4e7
commit
812e32f775
7 changed files with 92 additions and 30 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue