[Mesa-dev] [PATCH v5 25/34] nvir/nir: add getOperation for intrinsics

Karol Herbst kherbst at redhat.com
Tue Feb 20 21:02:43 UTC 2018


Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
 .../drivers/nouveau/codegen/nv50_ir_from_nir.cpp   | 24 ++++++++++++++++++++++
 1 file changed, 24 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 98c22bcc89..a563c3e0a2 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -131,9 +131,11 @@ public:
    DataType getSType(nir_src&, bool isFloat, bool isSigned);
 
    operation getOperation(nir_op);
+   operation getOperation(nir_intrinsic_op);
    operation getOperation(nir_texop);
    operation preOperationNeeded(nir_op);
    int getSubOp(nir_op);
+   int getSubOp(nir_intrinsic_op);
    CondCode getCondCode(nir_op);
 
    // tex stuff
@@ -394,6 +396,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)
 {
@@ -416,6 +429,17 @@ Converter::getSubOp(nir_op op)
    }
 }
 
+int
+Converter::getSubOp(nir_intrinsic_op op)
+{
+   switch (op) {
+   default:
+      ERROR("couldn't get subop for nir_intrinsic_op %u\n", op);
+      assert(false);
+      return 0;
+   }
+}
+
 CondCode
 Converter::getCondCode(nir_op op)
 {
-- 
2.14.3



More information about the mesa-dev mailing list