diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs index a781de42..8e39662d 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs @@ -199,7 +199,7 @@ namespace Ryujinx.Graphics.Gpu.Shader Span<byte> code = _context.MemoryAccessor.Read(gpuVa, MaxProgramSize); - program = Translator.Translate(code, flags); + program = Translator.Translate(code, GetShaderCapabilities(), flags); int[] codeCached = MemoryMarshal.Cast<byte, int>(code.Slice(0, program.Size)).ToArray(); @@ -238,7 +238,7 @@ namespace Ryujinx.Graphics.Gpu.Shader Span<byte> codeA = _context.MemoryAccessor.Read(gpuVaA, MaxProgramSize); Span<byte> codeB = _context.MemoryAccessor.Read(gpuVa, MaxProgramSize); - program = Translator.Translate(codeA, codeB, flags); + program = Translator.Translate(codeA, codeB, GetShaderCapabilities(), flags); // TODO: We should also check "codeA" into account. codeCached = MemoryMarshal.Cast<byte, int>(codeB.Slice(0, program.Size)).ToArray(); @@ -258,7 +258,7 @@ namespace Ryujinx.Graphics.Gpu.Shader { Span<byte> code = _context.MemoryAccessor.Read(gpuVa, MaxProgramSize); - program = Translator.Translate(code, flags); + program = Translator.Translate(code, GetShaderCapabilities(), flags); codeCached = MemoryMarshal.Cast<byte, int>(code.Slice(0, program.Size)).ToArray(); @@ -342,5 +342,10 @@ namespace Ryujinx.Graphics.Gpu.Shader isFirst = false; } } + + private ShaderCapabilities GetShaderCapabilities() + { + return new ShaderCapabilities(_context.Capabilities.StorageBufferOffsetAlignment); + } } }
\ No newline at end of file |
