<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 26, 2017 at 11:35 PM, Iago Toral <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, 2017-10-25 at 16:25 -0700, Jason Ekstrand wrote:<br>
> Stop retyping the output of shuffle_64bit_data_for_32bit_<wbr>write. It's<br>
> always BRW_REGISTER_TYPE_D which is perfectly fine for writing out.<br>
> Also, when we change get_nir_src to return something with a 64-bit<br>
> type<br>
> for 64-bit values, the retyping will not be at all what we<br>
> want. Also,<br>
> retyping the output based on src.type before we whack it back to 32<br>
> bits<br>
> is a problem because the output is always 32 bits.<br>
> ---<br>
> src/intel/compiler/brw_fs_<wbr>nir.cpp | 6 +++---<br>
> 1 file changed, 3 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> index 5bcdb1a..e008e2e 100644<br>
> --- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> +++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
> @@ -4058,18 +4058,18 @@ fs_visitor::nir_emit_<wbr>intrinsic(const<br>
> fs_builder &bld, nir_intrinsic_instr *instr<br>
> <br>
> nir_const_value *const_offset = nir_src_as_const_value(instr-<br>
> >src[1]);<br>
> assert(const_offset && "Indirect output stores not allowed");<br>
> - fs_reg new_dest = retype(offset(outputs[instr-<br>
> >const_index[0]], bld,<br>
> - <wbr> 4 * const_offset->u32[0]),<br>
> src.type);<br>
> <br>
> unsigned num_components = instr->num_components;<br>
> unsigned first_component = nir_intrinsic_component(instr)<wbr>;<br>
> if (nir_src_bit_size(instr->src[<wbr>0]) == 64) {<br>
> fs_reg tmp = shuffle_64bit_data_for_32bit_<wbr>write(bld,<br>
> retype(src, BRW_REGISTER_TYPE_DF), num_components);<br>
> - src = retype(tmp, src.type);<br>
> + src = tmp;<br>
<br>
</div></div>Maybe just make this:<br>
<br>
src = suffle_64bit_data_for_32bit_<wbr>write(...) ?<br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>Fixed locally.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
> num_components *= 2;<br>
> }<br>
> <br>
> + fs_reg new_dest = retype(offset(outputs[instr-<br>
> >const_index[0]], bld,<br>
> + <wbr> 4 * const_offset->u32[0]),<br>
> src.type);<br>
> for (unsigned j = 0; j < num_components; j++) {<br>
> bld.MOV(offset(new_<wbr>dest, bld, j + first_component),<br>
> offset(src, bld, j));<br>
</div></div></blockquote></div><br></div></div>