Do not add more code after alpha test discard on fragment shader (#5529)

* Do not add more code after alpha test discard on fragment shader

* Shader cache version bump
This commit is contained in:
gdkchan 2023-08-07 12:20:37 -03:00 committed by GitHub
parent 3ab0a71c7b
commit 42750a74f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 9 deletions

View file

@ -162,8 +162,10 @@ namespace Ryujinx.Graphics.Shader.Instructions
if (op.Ccc == Ccc.T)
{
context.PrepareForReturn();
context.Return();
if (context.PrepareForReturn())
{
context.Return();
}
}
else
{
@ -174,8 +176,12 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand lblSkip = Label();
context.BranchIfFalse(lblSkip, cond);
context.PrepareForReturn();
context.Return();
if (context.PrepareForReturn())
{
context.Return();
}
context.MarkLabel(lblSkip);
}
}