diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-11-21 23:46:14 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 2437ccca0e82b8b2a99d8632acf28ca0cc14c523 (patch) | |
| tree | fff04c08f5812b602378f352650144736983497a /Ryujinx.Graphics.Gpu/Engine/Compute.cs | |
| parent | 3ca675223a495f7d0a9d2130b8d88d9c5c79747e (diff) | |
Separate sub-channel state
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 14 |
1 files changed, 7 insertions, 7 deletions
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<int>(MethodOffset.DispatchParamsAddress); + uint dispatchParamsAddress = (uint)state.Get<int>(MethodOffset.DispatchParamsAddress); var dispatchParams = _context.MemoryAccessor.Read<ComputeParams>((ulong)dispatchParamsAddress << 8); - GpuVa shaderBaseAddress = _context.State.Get<GpuVa>(MethodOffset.ShaderBaseAddress); + GpuVa shaderBaseAddress = state.Get<GpuVa>(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<PoolState>(MethodOffset.SamplerPoolState); + var samplerPool = state.Get<PoolState>(MethodOffset.SamplerPoolState); _textureManager.SetComputeSamplerPool(samplerPool.Address.Pack(), samplerPool.MaximumId); - var texturePool = _context.State.Get<PoolState>(MethodOffset.TexturePoolState); + var texturePool = state.Get<PoolState>(MethodOffset.TexturePoolState); _textureManager.SetComputeTexturePool(texturePool.Address.Pack(), texturePool.MaximumId); - _textureManager.SetComputeTextureBufferIndex(_context.State.Get<int>(MethodOffset.TextureBufferIndex)); + _textureManager.SetComputeTextureBufferIndex(state.Get<int>(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 |
