From 2437ccca0e82b8b2a99d8632acf28ca0cc14c523 Mon Sep 17 00:00:00 2001 From: gdk Date: Thu, 21 Nov 2019 23:46:14 -0300 Subject: Separate sub-channel state --- Ryujinx.Graphics.Gpu/Engine/Compute.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs index 108cc197..ba7daf67 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs @@ -10,13 +10,13 @@ namespace Ryujinx.Graphics.Gpu.Engine { partial class Methods { - public void Dispatch(int argument) + public void Dispatch(GpuState state, int argument) { - uint dispatchParamsAddress = (uint)_context.State.Get(MethodOffset.DispatchParamsAddress); + uint dispatchParamsAddress = (uint)state.Get(MethodOffset.DispatchParamsAddress); var dispatchParams = _context.MemoryAccessor.Read((ulong)dispatchParamsAddress << 8); - GpuVa shaderBaseAddress = _context.State.Get(MethodOffset.ShaderBaseAddress); + GpuVa shaderBaseAddress = state.Get(MethodOffset.ShaderBaseAddress); ulong shaderGpuVa = shaderBaseAddress.Pack() + (uint)dispatchParams.ShaderOffset; @@ -28,15 +28,15 @@ namespace Ryujinx.Graphics.Gpu.Engine _context.Renderer.Pipeline.BindProgram(cs.HostProgram); - var samplerPool = _context.State.Get(MethodOffset.SamplerPoolState); + var samplerPool = state.Get(MethodOffset.SamplerPoolState); _textureManager.SetComputeSamplerPool(samplerPool.Address.Pack(), samplerPool.MaximumId); - var texturePool = _context.State.Get(MethodOffset.TexturePoolState); + var texturePool = state.Get(MethodOffset.TexturePoolState); _textureManager.SetComputeTexturePool(texturePool.Address.Pack(), texturePool.MaximumId); - _textureManager.SetComputeTextureBufferIndex(_context.State.Get(MethodOffset.TextureBufferIndex)); + _textureManager.SetComputeTextureBufferIndex(state.Get(MethodOffset.TextureBufferIndex)); ShaderProgramInfo info = cs.Shader.Program.Info; @@ -119,7 +119,7 @@ namespace Ryujinx.Graphics.Gpu.Engine dispatchParams.UnpackGridSizeY(), dispatchParams.UnpackGridSizeZ()); - UpdateShaderState(); + UpdateShaderState(state); } } } \ No newline at end of file -- cgit v1.2.3