<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 9, 2018 at 4:13 AM, Jose Maria Casanova Crespo <span dir="ltr"><<a href="mailto:jmcasanova@igalia.com" target="_blank">jmcasanova@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">shuffle_from_32bit_read manages 32-bit reads to 32-bit destination<br>
in the same way that the previous loop so now we just call the new<br>
function for all bitsizes, simplifying also the 64-bit load_input.<br>
---<br>
 src/intel/compiler/brw_fs_nir.<wbr>cpp | 12 ++----------<br>
 1 file changed, 2 insertions(+), 10 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
index 6abc7c0174d..fedf3bf5a83 100644<br>
--- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
+++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
@@ -2483,16 +2483,8 @@ fs_visitor::nir_emit_vs_<wbr>intrinsic(const fs_builder &bld,<br>
       if (type_sz(dest.type) == 8)<br>
          first_component /= 2;<br>
<br>
-      for (unsigned j = 0; j < num_components; j++) {<br>
-         bld.MOV(offset(dest, bld, j), offset(src, bld, j + first_component));<br>
-      }<br>
-<br>
-      if (type_sz(dest.type) == 8) {<br>
-         shuffle_32bit_load_result_to_<wbr>64bit_data(bld,<br>
-                                                 dest,<br>
-                                                 retype(dest, BRW_REGISTER_TYPE_F),<br>
-                                                 instr->num_components);<br>
-      }<br>
+      shuffle_from_32bit_read(bld, dest, retype(src, BRW_REGISTER_TYPE_D),<br>
+                              first_component, num_components);<br></blockquote><div><br></div><div>I think this is ok.  It makes me a bit nervous to use shuffle_from_32bit_read on the address register file.  However, since we're only doing it when type_sz(dst.type) >= 4, it should be ok.  If we want 16-bit attributes (Yeah, I know, I need to review that...) then we may need to first copy from the ATTR file into a temp.  Maybe drop a comment to that effect?</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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
       break;<br>
    }<br>
<span class="HOEnZb"><font color="#888888"> <br>
-- <br>
2.17.1<br>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>