summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2017-12-23 02:25:41 +0100
committerKarol Herbst <[email protected]>2019-03-17 10:33:28 +0100
commit4dec7f81e0066554347461822b1fcbe6f355674a (patch)
tree89ff4fa91a0709e026868d0dcca7273c52af105a
parentbb032d8b629cd42c8b7767d9f2156530b1b746f9 (diff)
nv50/ir/nir: add skeleton getOperation for intrinsics
v7: don't assert in default case for getSubOp Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp22
1 files changed, 22 insertions, 0 deletions
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 2c4513aad02..ab3bf7f843a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -116,10 +116,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);
@@ -458,6 +460,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)
{
switch (op) {
@@ -481,6 +494,15 @@ Converter::getSubOp(nir_op op)
}
}
+int
+Converter::getSubOp(nir_intrinsic_op op)
+{
+ switch (op) {
+ default:
+ return 0;
+ }
+}
+
CondCode
Converter::getCondCode(nir_op op)
{