summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/shader/shader_ir.cpp')
-rw-r--r--src/video_core/shader/shader_ir.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp
index 20a1a50ef..aec1fb36b 100644
--- a/src/video_core/shader/shader_ir.cpp
+++ b/src/video_core/shader/shader_ir.cpp
@@ -309,6 +309,18 @@ Node ShaderIR::GetPredicateComparisonHalf(Tegra::Shader::PredCondition condition
return predicate;
}
+OperationCode ShaderIR::GetPredicateCombiner(PredOperation operation) {
+ static const std::unordered_map<PredOperation, OperationCode> PredicateOperationTable = {
+ {PredOperation::And, OperationCode::LogicalAnd},
+ {PredOperation::Or, OperationCode::LogicalOr},
+ {PredOperation::Xor, OperationCode::LogicalXor},
+ };
+
+ const auto op = PredicateOperationTable.find(operation);
+ UNIMPLEMENTED_IF_MSG(op == PredicateOperationTable.end(), "Unknown predicate operation");
+ return op->second;
+}
+
void ShaderIR::SetRegister(BasicBlock& bb, Register dest, Node src) {
bb.push_back(Operation(OperationCode::Assign, GetRegister(dest), src));
}