mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +00:00
SPIR-V: Implement LogicalExclusiveOr
This commit is contained in:
parent
fbfaf63940
commit
1448136c3d
2 changed files with 8 additions and 0 deletions
|
@ -96,6 +96,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
Add(Instruction.Lod, GenerateLod);
|
||||
Add(Instruction.LogarithmB2, GenerateLogarithmB2);
|
||||
Add(Instruction.LogicalAnd, GenerateLogicalAnd);
|
||||
Add(Instruction.LogicalExclusiveOr, GenerateLogicalExclusiveOr);
|
||||
Add(Instruction.LogicalNot, GenerateLogicalNot);
|
||||
Add(Instruction.LogicalOr, GenerateLogicalOr);
|
||||
Add(Instruction.LoopBreak, GenerateLoopBreak);
|
||||
|
@ -994,6 +995,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
return GenerateBinaryBool(context, operation, context.Delegates.LogicalAnd);
|
||||
}
|
||||
|
||||
private static OperationResult GenerateLogicalExclusiveOr(CodeGenContext context, AstOperation operation)
|
||||
{
|
||||
return GenerateBinaryBool(context, operation, context.Delegates.LogicalNotEqual);
|
||||
}
|
||||
|
||||
private static OperationResult GenerateLogicalNot(CodeGenContext context, AstOperation operation)
|
||||
{
|
||||
return GenerateUnaryBool(context, operation, context.Delegates.LogicalNot);
|
||||
|
|
|
@ -74,6 +74,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
// BinaryBool
|
||||
public readonly FuncBinaryInstruction LogicalAnd;
|
||||
public readonly FuncBinaryInstruction LogicalNotEqual;
|
||||
public readonly FuncBinaryInstruction LogicalOr;
|
||||
|
||||
// BinaryS32
|
||||
|
@ -180,6 +181,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
// BinaryBool
|
||||
LogicalAnd = context.LogicalAnd;
|
||||
LogicalNotEqual = context.LogicalNotEqual;
|
||||
LogicalOr = context.LogicalOr;
|
||||
|
||||
// BinaryS32
|
||||
|
|
Loading…
Reference in a new issue