mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-10 05:33:16 +02:00
Use correct shared memory size (in words, not bytes)
This commit is contained in:
parent
ad3bc2531b
commit
3323a3a042
@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||||||
ulong shaderGpuVa = shaderBaseAddress.Pack() + (uint)dispatchParams.ShaderOffset;
|
ulong shaderGpuVa = shaderBaseAddress.Pack() + (uint)dispatchParams.ShaderOffset;
|
||||||
|
|
||||||
// Note: A size of 0 is also invalid, the size must be at least 1.
|
// Note: A size of 0 is also invalid, the size must be at least 1.
|
||||||
int sharedMemorySize = Math.Clamp(dispatchParams.SharedMemorySize & 0xffff, 1, _context.Capabilities.MaximumComputeSharedMemorySize);
|
int sharedMemorySize = Math.Clamp(dispatchParams.SharedMemorySize & 0xffff, 4, _context.Capabilities.MaximumComputeSharedMemorySize);
|
||||||
|
|
||||||
ComputeShader cs = _shaderCache.GetComputeShader(
|
ComputeShader cs = _shaderCache.GetComputeShader(
|
||||||
shaderGpuVa,
|
shaderGpuVa,
|
||||||
|
@ -212,7 +212,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||||||
|
|
||||||
int[] codeCached = MemoryMarshal.Cast<byte, int>(code.Slice(0, program.Size)).ToArray();
|
int[] codeCached = MemoryMarshal.Cast<byte, int>(code.Slice(0, program.Size)).ToArray();
|
||||||
|
|
||||||
program.Replace(DefineNames.SharedMemorySize, sharedMemorySize.ToString(CultureInfo.InvariantCulture));
|
program.Replace(DefineNames.SharedMemorySize, (sharedMemorySize / 4).ToString(CultureInfo.InvariantCulture));
|
||||||
|
|
||||||
program.Replace(DefineNames.LocalSizeX, localSizeX.ToString(CultureInfo.InvariantCulture));
|
program.Replace(DefineNames.LocalSizeX, localSizeX.ToString(CultureInfo.InvariantCulture));
|
||||||
program.Replace(DefineNames.LocalSizeY, localSizeY.ToString(CultureInfo.InvariantCulture));
|
program.Replace(DefineNames.LocalSizeY, localSizeY.ToString(CultureInfo.InvariantCulture));
|
||||||
|
Loading…
Reference in New Issue
Block a user