diff options
| author | riperiperi <rhy3756547@hotmail.com> | 2021-06-15 01:09:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-15 02:09:59 +0200 |
| commit | 7ff1f9aa121a7c2f59f8cba4bb5367839342ed62 (patch) | |
| tree | 64a12c5d1e4732af088b6f006eafd4506ddf662b /Ryujinx.Graphics.Shader/Decoders/Decoder.cs | |
| parent | bfcc6a8ad63a0eb0f06968145a310c484a96e8ca (diff) | |
End shader decoding when reaching a block that starts with an infinite loop (after BRX) (#2367)
* End shader decoding when reaching an infinite loop
The NV shader compiler puts these at the end of shaders.
* Update shader cache version
Diffstat (limited to 'Ryujinx.Graphics.Shader/Decoders/Decoder.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Decoders/Decoder.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs index 2d00f237..9ca58177 100644 --- a/Ryujinx.Graphics.Shader/Decoders/Decoder.cs +++ b/Ryujinx.Graphics.Shader/Decoders/Decoder.cs @@ -9,6 +9,8 @@ namespace Ryujinx.Graphics.Shader.Decoders { static class Decoder { + public const ulong ShaderEndDelimiter = 0xe2400fffff87000f; + public static Block[][] Decode(IGpuAccessor gpuAccessor, ulong startAddress, out bool hasBindless) { hasBindless = false; @@ -190,7 +192,7 @@ namespace Ryujinx.Graphics.Shader.Decoders ulong inst = gpuAccessor.MemoryRead<ulong>(startAdddress + currBlock.EndAddress); - return inst != 0UL; + return inst != 0UL && inst != ShaderEndDelimiter; } private static bool BinarySearch(List<Block> blocks, ulong address, out int index) |
