<div dir="ltr"><div>I landed the first four but it'd be nice if I could get some review on the intel bits.</div><div><br></div><div>--Jason<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 20, 2018 at 12:55 PM Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Previously, the only thing we had was nir_src_as_const_value which returns<br>
a pointer to a nir_const_value which was NULL if the source wasn't actually<br>
a constant.  This was great except that almost none of the users considered<br>
anything other than 32-bit values.  With 8, 16, and 64-bit values floating<br>
around, we really shouldn't be hand-rolling it everywhere.  Most of the<br>
code is currently safe if you operate under the assumption that things like<br>
array indices are always 32 bits.  The glaring exception was some of the<br>
helpers in nir_search_helpers.h where we definitely cannot be making that<br>
assumption but were anyway.<br>
<br>
I've converted core NIR and i965 but have not written patches for vc4, ir3,<br>
or radeon.<br>
<br>
Cc: Connor Abbott <<a href="mailto:cwabbott0@gmail.com" target="_blank">cwabbott0@gmail.com</a>><br>
Cc: Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>><br>
Cc: Eric Anholt <<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>><br>
Cc: Rob Clark <<a href="mailto:robdclark@gmail.com" target="_blank">robdclark@gmail.com</a>><br>
Cc: Karol Herbst <<a href="mailto:karolherbst@gmail.com" target="_blank">karolherbst@gmail.com</a>><br>
Cc: Bas Nieuwenhuizen <<a href="mailto:bas@basnieuwenhuizen.nl" target="_blank">bas@basnieuwenhuizen.nl</a>><br>
<br>
Jason Ekstrand (9):<br>
  nir: Add some new helpers for working with const sources<br>
  nir/search: Use nir_src_is_const and friends<br>
  nir/search_helpers: Use nir_src_is_const and friends<br>
  nir: Use nir_src_is_const and nir_src_as_* in core code<br>
  intel/fs,vec4: Clean up a repeated pattern with SSBOs<br>
  intel/fs: Use the new nir_src_is_const and friends<br>
  intel/vec4: Use the new nir_src_is_const and friends<br>
  intel/analyze_ubo_ranges: Use nir_src_is_const and friends<br>
  anv: Use nir_src_is_const and friends in lowering code<br>
<br>
 src/compiler/glsl/gl_nir_lower_samplers.c     |   7 +-<br>
 src/compiler/nir/nir.c                        |  92 +++++<br>
 src/compiler/nir/nir.h                        |  16 +<br>
 src/compiler/nir/nir_deref.c                  |  14 +-<br>
 src/compiler/nir/nir_gather_info.c            |   6 +-<br>
 src/compiler/nir/nir_gs_count_vertices.c      |   7 +-<br>
 src/compiler/nir/nir_lower_clip.c             |   2 +-<br>
 src/compiler/nir/nir_lower_indirect_derefs.c  |   4 +-<br>
 src/compiler/nir/nir_lower_io.c               |   6 +-<br>
 .../nir/nir_lower_io_arrays_to_elements.c     |  11 +-<br>
 src/compiler/nir/nir_lower_locals_to_regs.c   |   6 +-<br>
 src/compiler/nir/nir_lower_two_sided_color.c  |   2 +-<br>
 src/compiler/nir/nir_lower_vars_to_ssa.c      |  14 +-<br>
 src/compiler/nir/nir_opt_dead_cf.c            |   7 +-<br>
 src/compiler/nir/nir_opt_find_array_copies.c  |  13 +-<br>
 src/compiler/nir/nir_opt_intrinsics.c         |   4 +-<br>
 src/compiler/nir/nir_opt_large_constants.c    |   2 +-<br>
 src/compiler/nir/nir_search.c                 |  70 +---<br>
 src/compiler/nir/nir_search_helpers.h         |  49 ++-<br>
 src/compiler/nir/nir_split_vars.c             |  17 +-<br>
 src/compiler/nir/tests/vars_tests.cpp         |  10 +-<br>
 src/intel/compiler/brw_fs.h                   |   2 +<br>
 src/intel/compiler/brw_fs_nir.cpp             | 315 +++++++-----------<br>
 .../compiler/brw_nir_analyze_ubo_ranges.c     |  15 +-<br>
 src/intel/compiler/brw_vec4.h                 |   2 +<br>
 src/intel/compiler/brw_vec4_gs_nir.cpp        |  12 +-<br>
 src/intel/compiler/brw_vec4_nir.cpp           | 190 ++++-------<br>
 src/intel/compiler/brw_vec4_tcs.cpp           |   6 +-<br>
 .../vulkan/anv_nir_apply_pipeline_layout.c    |  15 +-<br>
 .../vulkan/anv_nir_lower_ycbcr_textures.c     |   6 +-<br>
 30 files changed, 423 insertions(+), 499 deletions(-)<br>
<br>
-- <br>
2.19.1<br>
<br>
</blockquote></div>