diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs index a7f6ec06..26041ecc 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs @@ -16,11 +16,13 @@ namespace Ryujinx.Graphics.Gpu.Engine /// <param name="argument">Method call argument</param> public void Dispatch(GpuState state, int argument) { - FlushUboDirty(); + var memoryManager = state.Channel.MemoryManager; + + FlushUboDirty(memoryManager); uint qmdAddress = (uint)state.Get<int>(MethodOffset.DispatchParamsAddress); - var qmd = _context.MemoryManager.Read<ComputeQmd>((ulong)qmdAddress << 8); + var qmd = state.Channel.MemoryManager.Read<ComputeQmd>((ulong)qmdAddress << 8); GpuVa shaderBaseAddress = state.Get<GpuVa>(MethodOffset.ShaderBaseAddress); @@ -43,7 +45,7 @@ namespace Ryujinx.Graphics.Gpu.Engine state.Channel.BufferManager.SetComputeUniformBuffer(index, gpuVa, size); } - ShaderBundle cs = ShaderCache.GetComputeShader( + ShaderBundle cs = memoryManager.Physical.ShaderCache.GetComputeShader( state, shaderGpuVa, qmd.CtaThreadDimension0, @@ -82,7 +84,7 @@ namespace Ryujinx.Graphics.Gpu.Engine cbDescAddress += (ulong)cbDescOffset; - SbDescriptor cbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(cbDescAddress); + SbDescriptor cbDescriptor = state.Channel.MemoryManager.Physical.Read<SbDescriptor>(cbDescAddress); state.Channel.BufferManager.SetComputeUniformBuffer(cb.Slot, cbDescriptor.PackAddress(), (uint)cbDescriptor.Size); } @@ -97,7 +99,7 @@ namespace Ryujinx.Graphics.Gpu.Engine sbDescAddress += (ulong)sbDescOffset; - SbDescriptor sbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(sbDescAddress); + SbDescriptor sbDescriptor = state.Channel.MemoryManager.Physical.Read<SbDescriptor>(sbDescAddress); state.Channel.BufferManager.SetComputeStorageBuffer(sb.Slot, sbDescriptor.PackAddress(), (uint)sbDescriptor.Size, sb.Flags); } |