summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_control_flow.c
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>2016-03-23 08:04:09 +0100
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>2016-04-11 08:27:04 +0200
commite3edaec739a72a36d54b60ddf5c952d377324f00 (patch)
treef16728178175bdfcb369e5d03ae7b7991f003fed /src/compiler/nir/nir_control_flow.c
parent41a39e338470d2b0e1b78e5e45d673f64f4dc418 (diff)
downloadexternal_mesa3d-e3edaec739a72a36d54b60ddf5c952d377324f00.zip
external_mesa3d-e3edaec739a72a36d54b60ddf5c952d377324f00.tar.gz
external_mesa3d-e3edaec739a72a36d54b60ddf5c952d377324f00.tar.bz2
nir: add bit_size info to nir_ssa_undef_instr_create()
v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/compiler/nir/nir_control_flow.c')
-rw-r--r--src/compiler/nir/nir_control_flow.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_control_flow.c b/src/compiler/nir/nir_control_flow.c
index 33b06d0..ea57412 100644
--- a/src/compiler/nir/nir_control_flow.c
+++ b/src/compiler/nir/nir_control_flow.c
@@ -281,7 +281,8 @@ insert_phi_undef(nir_block *block, nir_block *pred)
nir_phi_instr *phi = nir_instr_as_phi(instr);
nir_ssa_undef_instr *undef =
nir_ssa_undef_instr_create(ralloc_parent(phi),
- phi->dest.ssa.num_components);
+ phi->dest.ssa.num_components,
+ phi->dest.ssa.bit_size);
nir_instr_insert_before_cf_list(&impl->body, &undef->instr);
nir_phi_src *src = ralloc(phi, nir_phi_src);
src->pred = pred;
@@ -691,7 +692,8 @@ replace_ssa_def_uses(nir_ssa_def *def, void *void_impl)
void *mem_ctx = ralloc_parent(impl);
nir_ssa_undef_instr *undef =
- nir_ssa_undef_instr_create(mem_ctx, def->num_components);
+ nir_ssa_undef_instr_create(mem_ctx, def->num_components,
+ def->bit_size);
nir_instr_insert_before_cf_list(&impl->body, &undef->instr);
nir_ssa_def_rewrite_uses(def, nir_src_for_ssa(&undef->def));
return true;