diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-08-11 15:59:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 20:59:42 +0200 |
| commit | d9d18439f6900fd9f05bde41998526281f7638c5 (patch) | |
| tree | 14e8cd74e10ca9c92d1b85ccf17cecad00e3a8f7 /Ryujinx.Graphics.Shader/Instructions | |
| parent | 70f79e689bc947313aab11c41e59928ce43be517 (diff) | |
Use a new approach for shader BRX targets (#2532)
* Use a new approach for shader BRX targets
* Make shader cache actually work
* Improve the shader pattern matching a bit
* Extend LDC search to predecessor blocks, catches more cases
* Nit
* Only save the amount of constant buffer data actually used. Avoids crashes on partially mapped buffers
* Ignore Rd on predicate instructions, as they do not have a Rd register (catches more cases)
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitFlow.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitFlow.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitFlow.cs index d4ab5955..1f5bf35b 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitFlow.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitFlow.cs @@ -25,6 +25,12 @@ namespace Ryujinx.Graphics.Shader.Instructions { OpCodeBranchIndir op = (OpCodeBranchIndir)context.CurrOp; + if (op.PossibleTargets.Count == 0) + { + context.Config.GpuAccessor.Log($"Failed to find targets for BRX instruction at 0x{op.Address:X}."); + return; + } + int offset = (int)op.Address + 8 + op.Offset; Operand address = context.IAdd(Register(op.Ra), Const(offset)); |
