[Mesa-dev] [PATCH 10/22] nvir/nir: add skeleton for nir_intrinsic_instr
Karol Herbst
kherbst at redhat.com
Thu Dec 21 15:51:28 UTC 2017
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
.../drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 17 +++++++++++++++++
1 file changed, 17 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 f13699a393..fe11280537 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -69,6 +69,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 *);
@@ -485,6 +486,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;
@@ -542,6 +547,18 @@ Converter::visit(nir_jump_instr *insn)
return true;
}
+bool
+Converter::visit(nir_intrinsic_instr *insn)
+{
+ switch (insn->intrinsic) {
+ default:
+ ERROR("unknown nir_intrinsic_op %s\n", nir_intrinsic_infos[insn->intrinsic].name);
+ return false;
+ }
+
+ return true;
+}
+
bool
Converter::run()
{
--
2.14.3
More information about the mesa-dev
mailing list