mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-12 21:59:12 +00:00
Format whitespace
This commit is contained in:
parent
4d3f5e3818
commit
07e68ca653
2 changed files with 8 additions and 6 deletions
|
@ -422,7 +422,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Dma
|
|||
_state.State.SetRemapComponentsComponentSize == SetRemapComponentsComponentSize.Four)
|
||||
{
|
||||
// Fast path for clears when remap is enabled.
|
||||
bufferCache.ClearBuffer(memoryManager, dstGpuVa, size * 4, _state.State.SetRemapConstA);
|
||||
BufferCache.ClearBuffer(_context, memoryManager, dstGpuVa, size * 4, _state.State.SetRemapConstA);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -358,21 +358,23 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||
/// <remarks>
|
||||
/// Both the address and size must be aligned to 4 bytes.
|
||||
/// </remarks>
|
||||
/// <param name="context">GPU context</param>
|
||||
/// <param name="memoryManager">GPU memory manager where the buffer is mapped</param>
|
||||
/// <param name="gpuVa">GPU virtual address of the region to clear</param>
|
||||
/// <param name="size">Number of bytes to clear</param>
|
||||
/// <param name="value">Value to be written into the buffer</param>
|
||||
public void ClearBuffer(MemoryManager memoryManager, ulong gpuVa, ulong size, uint value)
|
||||
public static void ClearBuffer(GpuContext context, MemoryManager memoryManager, ulong gpuVa, ulong size, uint value)
|
||||
{
|
||||
ulong address = TranslateAndCreateBuffer(memoryManager, gpuVa, size);
|
||||
PhysicalMemory physical = memoryManager.GetBackingMemory(gpuVa);
|
||||
|
||||
Buffer buffer = GetBuffer(address, size);
|
||||
ulong address = physical.BufferCache.TranslateAndCreateBuffer(memoryManager, gpuVa, size);
|
||||
Buffer buffer = physical.BufferCache.GetBuffer(address, size);
|
||||
|
||||
int offset = (int)(address - buffer.Address);
|
||||
|
||||
_context.Renderer.Pipeline.ClearBuffer(buffer.Handle, offset, (int)size, value);
|
||||
context.Renderer.Pipeline.ClearBuffer(buffer.Handle, offset, (int)size, value);
|
||||
|
||||
memoryManager.GetBackingMemory(gpuVa).FillTrackedResource(address, size, value, ResourceKind.Buffer);
|
||||
physical.FillTrackedResource(address, size, value, ResourceKind.Buffer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue