<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 5:05 AM, Samuel Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Connor Abbott <<a href="mailto:connor.w.abbott@intel.com">connor.w.abbott@intel.com</a>><br>
<br>
v2 (Sam):<br>
- Keep using nir_op_imov when calling nir_alu_instr_create() at<br>
rename_variables_block(). nir_op_fmov is not needed anymore.<br>
<br>
Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com">siglesias@igalia.com</a>><br>
---<br>
src/compiler/nir/nir_lower_vars_to_ssa.c | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c b/src/compiler/nir/nir_lower_vars_to_ssa.c<br>
index 2331791..511662e 100644<br>
--- a/src/compiler/nir/nir_lower_vars_to_ssa.c<br>
+++ b/src/compiler/nir/nir_lower_vars_to_ssa.c<br>
@@ -543,6 +543,8 @@ get_ssa_def_for_block(struct deref_node *node, nir_block *block,<br>
nir_ssa_undef_instr *undef =<br>
nir_ssa_undef_instr_create(state->shader,<br>
glsl_get_vector_elements(node->type));<br>
+ undef->def.bit_size =<br>
+ glsl_get_bit_size(glsl_get_base_type(node->type));<br></blockquote><div><br></div><div>Can we instead make nir_ssa_undef_instr_create take a bit size? That seems better than setting it manually. We probably want to do the same for load_cons.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
nir_instr_insert_before_cf_list(&state->impl->body, &undef->instr);<br>
def_stack_push(node, &undef->def, state);<br>
return &undef->def;<br>
@@ -627,6 +629,7 @@ rename_variables_block(nir_block *block, struct lower_variables_state *state)<br>
nir_ssa_undef_instr *undef =<br>
nir_ssa_undef_instr_create(state->shader,<br>
intrin->num_components);<br>
+ undef->def.bit_size = intrin->dest.ssa.bit_size;<br>
<br>
nir_instr_insert_before(&intrin->instr, &undef->instr);<br>
nir_instr_remove(&intrin->instr);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>