<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jan 15, 2019 at 7:55 AM Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
src/intel/compiler/brw_fs_nir.cpp | 9 +++++++--<br>
1 file changed, 7 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp<br>
index a3d193b8a44..ccf1891b925 100644<br>
--- a/src/intel/compiler/brw_fs_nir.cpp<br>
+++ b/src/intel/compiler/brw_fs_nir.cpp<br>
@@ -346,7 +346,9 @@ fs_visitor::nir_emit_impl(nir_function_impl *impl)<br>
reg->num_array_elems == 0 ? 1 : reg->num_array_elems;<br>
unsigned size = array_elems * reg->num_components;<br>
const brw_reg_type reg_type =<br>
- brw_reg_type_from_bit_size(reg->bit_size, BRW_REGISTER_TYPE_F);<br>
+ brw_reg_type_from_bit_size(reg->bit_size,<br>
+ reg->bit_size == 8 ? BRW_REGISTER_TYPE_D :<br>
+ BRW_REGISTER_TYPE_F);<br></blockquote><div><br></div><div>If it were me, I'd do</div><div><br></div><div>const brw_reg_type reg_type = reg->bit_size == 8 ? BRW_REGISTER_TYPE_B :</div><div> brw_reg_type_for_bit_size(reg->bit_size, BRW_REGISTER_TYPE_F);</div><div><br></div><div>I just find that a tiny bit easier to parse. Either way is fine though.</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
nir_locals[reg->index] = bld.vgrf(reg_type, size);<br>
}<br>
<br>
@@ -4281,7 +4283,10 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr<br>
fs_reg value = get_nir_src(instr->src[0]);<br>
if (instr->intrinsic == nir_intrinsic_vote_feq) {<br>
const unsigned bit_size = nir_src_bit_size(instr->src[0]);<br>
- value.type = brw_reg_type_from_bit_size(bit_size, BRW_REGISTER_TYPE_F);<br>
+ value.type =<br>
+ brw_reg_type_from_bit_size(bit_size,<br>
+ bit_size == 8 ? BRW_REGISTER_TYPE_D :<br>
+ BRW_REGISTER_TYPE_F);<br>
}<br>
<br>
fs_reg uniformized = bld.emit_uniformize(value);<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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>
</blockquote></div></div>