[Mesa-dev] [PATCH v2 15/31] nvir/nir: add skeleton for nir_intrinsic_instr
Karol Herbst
kherbst at redhat.com
Thu Jan 4 15:02:01 UTC 2018
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 eeefadbfd0..e84cb25a85 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -78,6 +78,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 *);
@@ -1079,6 +1080,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;
@@ -1136,6 +1141,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