diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Compute.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs index 46857b33..bbf1eeaa 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs @@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Gpu.Engine ulong shaderGpuVa = shaderBaseAddress.Pack() + (uint)dispatchParams.ShaderOffset; // Note: A size of 0 is also invalid, the size must be at least 1. - int sharedMemorySize = Math.Clamp(dispatchParams.SharedMemorySize & 0xffff, 4, _context.Capabilities.MaximumComputeSharedMemorySize); + int sharedMemorySize = Math.Clamp(dispatchParams.SharedMemorySize & 0xffff, 1, _context.Capabilities.MaximumComputeSharedMemorySize); ComputeShader cs = _shaderCache.GetComputeShader( shaderGpuVa, diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 0fa3514f..76b407cc 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -671,9 +671,7 @@ namespace Ryujinx.Graphics.Gpu.Engine addressesArray[index] = baseAddress + shader.Offset; } - bool viewportTransformEnable = GetViewportTransformEnable(state); - - GraphicsShader gs = _shaderCache.GetGraphicsShader(addresses, !viewportTransformEnable); + GraphicsShader gs = _shaderCache.GetGraphicsShader(state, addresses); _vsUsesInstanceId = gs.Shader[0].Program.Info.UsesInstanceId; @@ -734,7 +732,7 @@ namespace Ryujinx.Graphics.Gpu.Engine _context.Renderer.Pipeline.BindProgram(gs.HostProgram); } - private bool GetViewportTransformEnable(GpuState state) + public bool GetViewportTransformEnable(GpuState state) { // FIXME: We should read ViewportTransformEnable, but it seems that some games writes 0 there? // return state.Get<Boolean32>(MethodOffset.ViewportTransformEnable) != 0; |
