mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +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.Lod, GenerateLod);
|
||||||
Add(Instruction.LogarithmB2, GenerateLogarithmB2);
|
Add(Instruction.LogarithmB2, GenerateLogarithmB2);
|
||||||
Add(Instruction.LogicalAnd, GenerateLogicalAnd);
|
Add(Instruction.LogicalAnd, GenerateLogicalAnd);
|
||||||
|
Add(Instruction.LogicalExclusiveOr, GenerateLogicalExclusiveOr);
|
||||||
Add(Instruction.LogicalNot, GenerateLogicalNot);
|
Add(Instruction.LogicalNot, GenerateLogicalNot);
|
||||||
Add(Instruction.LogicalOr, GenerateLogicalOr);
|
Add(Instruction.LogicalOr, GenerateLogicalOr);
|
||||||
Add(Instruction.LoopBreak, GenerateLoopBreak);
|
Add(Instruction.LoopBreak, GenerateLoopBreak);
|
||||||
|
@ -994,6 +995,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
return GenerateBinaryBool(context, operation, context.Delegates.LogicalAnd);
|
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)
|
private static OperationResult GenerateLogicalNot(CodeGenContext context, AstOperation operation)
|
||||||
{
|
{
|
||||||
return GenerateUnaryBool(context, operation, context.Delegates.LogicalNot);
|
return GenerateUnaryBool(context, operation, context.Delegates.LogicalNot);
|
||||||
|
|
|
@ -74,6 +74,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
|
|
||||||
// BinaryBool
|
// BinaryBool
|
||||||
public readonly FuncBinaryInstruction LogicalAnd;
|
public readonly FuncBinaryInstruction LogicalAnd;
|
||||||
|
public readonly FuncBinaryInstruction LogicalNotEqual;
|
||||||
public readonly FuncBinaryInstruction LogicalOr;
|
public readonly FuncBinaryInstruction LogicalOr;
|
||||||
|
|
||||||
// BinaryS32
|
// BinaryS32
|
||||||
|
@ -180,6 +181,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
||||||
|
|
||||||
// BinaryBool
|
// BinaryBool
|
||||||
LogicalAnd = context.LogicalAnd;
|
LogicalAnd = context.LogicalAnd;
|
||||||
|
LogicalNotEqual = context.LogicalNotEqual;
|
||||||
LogicalOr = context.LogicalOr;
|
LogicalOr = context.LogicalOr;
|
||||||
|
|
||||||
// BinaryS32
|
// BinaryS32
|
||||||
|
|
Loading…
Reference in a new issue