aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs
index 9a3ae1b8..f966a4fc 100644
--- a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs
+++ b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessToIndexed.cs
@@ -17,7 +17,7 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
// The base offset of the array of handles on the constant buffer is the constant offset.
for (LinkedListNode<INode> node = block.Operations.First; node != null; node = node.Next)
{
- if (!(node.Value is TextureOperation texOp))
+ if (node.Value is not TextureOperation texOp)
{
continue;
}
@@ -27,7 +27,7 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
continue;
}
- if (!(texOp.GetSource(0).AsgOp is Operation handleAsgOp))
+ if (texOp.GetSource(0).AsgOp is not Operation handleAsgOp)
{
continue;
}
@@ -64,17 +64,17 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
// Plus this whole transform is fundamentally flawed as-is since we have no way to know the array size.
// Eventually, this should be entirely removed in favor of a implementation that supports true bindless
// texture access.
- if (!(ldcSrc2.AsgOp is Operation shrOp) || shrOp.Inst != Instruction.ShiftRightU32)
+ if (ldcSrc2.AsgOp is not Operation shrOp || shrOp.Inst != Instruction.ShiftRightU32)
{
continue;
}
- if (!(shrOp.GetSource(0).AsgOp is Operation shrOp2) || shrOp2.Inst != Instruction.ShiftRightU32)
+ if (shrOp.GetSource(0).AsgOp is not Operation shrOp2 || shrOp2.Inst != Instruction.ShiftRightU32)
{
continue;
}
- if (!(shrOp2.GetSource(0).AsgOp is Operation addOp) || addOp.Inst != Instruction.Add)
+ if (shrOp2.GetSource(0).AsgOp is not Operation addOp || addOp.Inst != Instruction.Add)
{
continue;
}
@@ -92,7 +92,7 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
Operand source = addOp.GetSource(0);
- Operation shrBy3 = new Operation(Instruction.ShiftRightU32, index, source, Const(3));
+ Operation shrBy3 = new(Instruction.ShiftRightU32, index, source, Const(3));
block.Operations.AddBefore(node, shrBy3);
@@ -106,4 +106,4 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
config.SetUsedTexture(texOp.Inst, texOp.Type, texOp.Format, texOp.Flags, texOp.CbufSlot, handle);
}
}
-} \ No newline at end of file
+}