summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2017-12-14 01:15:55 +0100
committerKarol Herbst <[email protected]>2019-03-17 10:33:28 +0100
commit83cb790bf06e2dde4789b1497ac287944c70b818 (patch)
tree8efb0cba351f5287b6e6a404af2ae1b4c9adea68 /src
parentad61f7e20d7e93833b81b016e224ad01c78ebad3 (diff)
nv50/ir/nir: implement nir_ssa_undef_instr
v2: use mkOp v8: don't require C++11 features Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp13
1 files changed, 13 insertions, 0 deletions
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 43c9a468f5a..2ed508bbc2d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -135,6 +135,7 @@ private:
bool visit(nir_jump_instr *);
bool visit(nir_load_const_instr*);
bool visit(nir_loop *);
+ bool visit(nir_ssa_undef_instr *);
nir_shader *nir;
@@ -1538,6 +1539,8 @@ Converter::visit(nir_instr *insn)
return visit(nir_instr_as_jump(insn));
case nir_instr_type_load_const:
return visit(nir_instr_as_load_const(insn));
+ case nir_instr_type_ssa_undef:
+ return visit(nir_instr_as_ssa_undef(insn));
default:
ERROR("unknown nir_instr type %u\n", insn->type);
return false;
@@ -2290,6 +2293,16 @@ Converter::visit(nir_alu_instr *insn)
#undef DEFAULT_CHECKS
bool
+Converter::visit(nir_ssa_undef_instr *insn)
+{
+ LValues &newDefs = convert(&insn->def);
+ for (uint8_t i = 0u; i < insn->def.num_components; ++i) {
+ mkOp(OP_NOP, TYPE_NONE, newDefs[i]);
+ }
+ return true;
+}
+
+bool
Converter::run()
{
bool progress;