nv50/ir/nir: add skeleton for nir_intrinsic_instr
authorKarol Herbst <kherbst@redhat.com>
Thu, 21 Dec 2017 12:33:23 +0000 (13:33 +0100)
committerKarol Herbst <kherbst@redhat.com>
Sun, 17 Mar 2019 09:33:28 +0000 (10:33 +0100)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp

index 3fa590a46555b1c52bc7aa437d3a647234ea8e5e..a99f3bbbc051d41fb0fd5e4a9bdf116dcb4d6a9d 100644 (file)
@@ -122,6 +122,7 @@ private:
    bool visit(nir_function *);
    bool visit(nir_if *);
    bool visit(nir_instr *);
+   bool visit(nir_intrinsic_instr *);
    bool visit(nir_jump_instr *);
    bool visit(nir_load_const_instr*);
    bool visit(nir_loop *);
@@ -1313,6 +1314,8 @@ bool
 Converter::visit(nir_instr *insn)
 {
    switch (insn->type) {
+   case nir_instr_type_intrinsic:
+      return visit(nir_instr_as_intrinsic(insn));
    case nir_instr_type_jump:
       return visit(nir_instr_as_jump(insn));
    case nir_instr_type_load_const:
@@ -1324,6 +1327,20 @@ Converter::visit(nir_instr *insn)
    return true;
 }
 
+bool
+Converter::visit(nir_intrinsic_instr *insn)
+{
+   nir_intrinsic_op op = insn->intrinsic;
+
+   switch (op) {
+   default:
+      ERROR("unknown nir_intrinsic_op %s\n", nir_intrinsic_infos[op].name);
+      return false;
+   }
+
+   return true;
+}
+
 bool
 Converter::visit(nir_jump_instr *insn)
 {