Fix FLO.SH shader instruction with a input of 0 (#2876)

* Fix FLO.SH shader instruction with a input of 0

* Shader cache version bump
This commit is contained in:
gdkchan
2021-12-05 09:25:05 -03:00
committed by GitHub
parent 2ab777885b
commit acc0b0f313
6 changed files with 27 additions and 15 deletions

View File

@ -166,13 +166,17 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
Operand srcB = context.BitwiseNot(src, invert);
Operand res = isSigned
? context.FindFirstSetS32(srcB)
: context.FindFirstSetU32(srcB);
Operand res;
if (sh)
{
res = context.BitwiseExclusiveOr(res, Const(31));
res = context.FindLSB(context.BitfieldReverse(srcB));
}
else
{
res = isSigned
? context.FindMSBS32(srcB)
: context.FindMSBU32(srcB);
}
context.Copy(GetDest(rd), res);