[Mesa-dev] [PATCH v5 16/34] nvir/nir: add skeleton for nir_intrinsic_instr
Karol Herbst
kherbst at redhat.com
Tue Feb 20 21:02:34 UTC 2018
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
.../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 19 +++++++++++++++++++
1 file changed, 19 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 0c5d5f2c90..544d2cc778 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -83,6 +83,7 @@ public:
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 *);
@@ -1212,6 +1213,10 @@ bool
Converter::visit(nir_instr *insn)
{
switch (insn->type) {
+ case nir_instr_type_intrinsic:
+ if (!visit(nir_instr_as_intrinsic(insn)))
+ return false;
+ break;
case nir_instr_type_load_const:
if (!visit(nir_instr_as_load_const(insn)))
return false;
@@ -1269,6 +1274,20 @@ Converter::visit(nir_jump_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::run()
{
--
2.14.3
More information about the mesa-dev
mailing list