[Mesa-dev] [PATCH v8 24/33] nvir/nir: add getOperation for intrinsics
Karol Herbst
kherbst at redhat.com
Fri Jun 29 22:32:11 UTC 2018
v7: don't assert in default case
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
.../nouveau/codegen/nv50_ir_from_nir.cpp | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index 9c9cc533006..e79871c1ebe 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -122,10 +122,12 @@ private:
std::vector<DataType> getSTypes(nir_alu_instr*);
DataType getSType(nir_src&, bool isFloat, bool isSigned);
+ operation getOperation(nir_intrinsic_op);
operation getOperation(nir_op);
operation getOperation(nir_texop);
operation preOperationNeeded(nir_op);
+ int getSubOp(nir_intrinsic_op);
int getSubOp(nir_op);
CondCode getCondCode(nir_op);
@@ -403,6 +405,17 @@ Converter::getOperation(nir_texop op)
}
}
+operation
+Converter::getOperation(nir_intrinsic_op op)
+{
+ switch (op) {
+ default:
+ ERROR("couldn't get operation for nir_intrinsic_op %u\n", op);
+ assert(false);
+ return OP_NOP;
+ }
+}
+
operation
Converter::preOperationNeeded(nir_op op)
{
@@ -425,6 +438,15 @@ Converter::getSubOp(nir_op op)
}
}
+int
+Converter::getSubOp(nir_intrinsic_op op)
+{
+ switch (op) {
+ default:
+ return 0;
+ }
+}
+
CondCode
Converter::getCondCode(nir_op op)
{
--
2.17.1
More information about the mesa-dev
mailing list