Implement clear buffer (fast path) (#1902)
* Implement clear buffer (fast path) * Remove blank line
This commit is contained in:
parent
68f6b79fd3
commit
df820a72de
8 changed files with 125 additions and 5 deletions
|
@ -200,8 +200,24 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
}
|
||||
else
|
||||
{
|
||||
// Buffer to buffer copy.
|
||||
BufferManager.CopyBuffer(cbp.SrcAddress, cbp.DstAddress, (uint)size);
|
||||
if (remap &&
|
||||
swizzle.UnpackDstX() == BufferSwizzleComponent.ConstA &&
|
||||
swizzle.UnpackDstY() == BufferSwizzleComponent.ConstA &&
|
||||
swizzle.UnpackDstZ() == BufferSwizzleComponent.ConstA &&
|
||||
swizzle.UnpackDstW() == BufferSwizzleComponent.ConstA &&
|
||||
swizzle.UnpackSrcComponentsCount() == 1 &&
|
||||
swizzle.UnpackDstComponentsCount() == 1 &&
|
||||
swizzle.UnpackComponentSize() == 4)
|
||||
{
|
||||
// Fast path for clears when remap is enabled.
|
||||
BufferManager.ClearBuffer(cbp.DstAddress, (uint)size * 4, state.Get<uint>(MethodOffset.CopyBufferConstA));
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Implement remap functionality.
|
||||
// Buffer to buffer copy.
|
||||
BufferManager.CopyBuffer(cbp.SrcAddress, cbp.DstAddress, (uint)size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue