Extend bindless elimination to catch a few more specific cases (#6921)

* Catch more cases on bindless elimination

* Match blocks with the same comparison condition

* Shader cache version bump
This commit is contained in:
gdkchan 2024-06-16 14:46:27 -03:00 committed by GitHub
parent 5a878ae9af
commit 3193ef1083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 137 additions and 30 deletions

View file

@ -156,6 +156,26 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
return false;
}
public static bool IsComparison(this Instruction inst)
{
switch (inst & Instruction.Mask)
{
case Instruction.CompareEqual:
case Instruction.CompareGreater:
case Instruction.CompareGreaterOrEqual:
case Instruction.CompareGreaterOrEqualU32:
case Instruction.CompareGreaterU32:
case Instruction.CompareLess:
case Instruction.CompareLessOrEqual:
case Instruction.CompareLessOrEqualU32:
case Instruction.CompareLessU32:
case Instruction.CompareNotEqual:
return true;
}
return false;
}
public static bool IsTextureQuery(this Instruction inst)
{
inst &= Instruction.Mask;