[Mesa-dev] [PATCH 0/7] nir: Prepare various passes for cast derefs

Jason Ekstrand jason at jlekstrand.net
Tue Dec 18 04:44:32 UTC 2018


In order to be able to use derefs for UBOs and SSBOs and actually pass them
through optimizations, various things need to be fixed up to properly
handle casts.  Because casts are only going to be allowed on UBOs, SSBOs,
and maybe shared variables at present, most of the time it's as simple as
making pass bail a tiny bit earlier by checking the deref mode before
looking for the variable.

Cc: Timothy Arceri <tarceri at itsqueeze.com>

Jason Ekstrand (7):
  nir/propagate_invariant: Skip unknown vars
  nir/linking_helpers: Look at derefs for modes
  nir/lower_io_arrays_to_elements: Look at derefs for modes
  nir/lower_io_to_scalar: Look at derefs for modes
  nir/lower_wpos_center: Look at derefs for modes
  nir/copy_prop_vars: Get modes directly from derefs
  nir/dead_write_vars: Get modes directly from derefs

 src/compiler/nir/nir_linking_helpers.c        | 23 +++++++++----------
 .../nir/nir_lower_io_arrays_to_elements.c     | 13 +++++++----
 src/compiler/nir/nir_lower_io_to_scalar.c     |  9 +++++---
 src/compiler/nir/nir_lower_wpos_center.c      |  6 +++--
 src/compiler/nir/nir_opt_copy_prop_vars.c     |  8 ++-----
 src/compiler/nir/nir_opt_dead_write_vars.c    |  3 +--
 src/compiler/nir/nir_propagate_invariant.c    |  2 +-
 7 files changed, 33 insertions(+), 31 deletions(-)

-- 
2.19.2



More information about the mesa-dev mailing list