Fix shift instructions and a typo

This commit is contained in:
gdkchan 2019-03-28 12:37:03 -03:00
parent 6f10a63820
commit 711093b553
2 changed files with 3 additions and 3 deletions

View file

@ -364,7 +364,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
if (!isMasked)
{
//Clamped shift value.
Operand isLessThan32 = context.ICompareLessUnsigned(res, Const(32));
Operand isLessThan32 = context.ICompareLessUnsigned(srcB, Const(32));
res = context.ConditionalSelect(isLessThan32, res, Const(0));
}
@ -413,7 +413,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
resShiftBy32 = Const(0);
}
Operand isLessThan32 = context.ICompareLessUnsigned(res, Const(32));
Operand isLessThan32 = context.ICompareLessUnsigned(srcB, Const(32));
res = context.ConditionalSelect(isLessThan32, res, resShiftBy32);
}

View file

@ -119,7 +119,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
//- The branch should be unconditional.
//- This should be the last block on the current (if) statement.
//- The statement before the else must be an if statement.
//- The branch target must be before or at (but not after) the end of the encloding block.
//- The branch target must be before or at (but not after) the end of the enclosing block.
if (block.Branch == null || block.Next != null || block.Index + 1 != _currEndIndex)
{
return false;