[Mesa-dev] [PATCH v2 0/9] nir: Remove the *_indirect form of input/output

Jason Ekstrand jason at jlekstrand.net
Fri Dec 4 15:11:54 PST 2015

This is a second crack at my attempt to get rid of the *_indirect for of
the input/output intrinsics.  The primary change is that we decided to keep
the const_index[0] base offset for all of the load/store intrinsics that
operate on opaque memory.  Along with this, the base offset is now much
better defined:  it is always the driver_location of the actual variable.
If, for instance, you access the second column of a mat4, const_index[0] is
the location of the whole mat4 and the offset source is load_const(2).

Thanks to keeping the base offset arround, this series is a lot more
straightforward than the first version.  I think the chances are
substantially higher that I didn't break vc4 or ir3.

Cc: Eric Anholt <eric at anholt.net>
Cc: Rob Clark <robclark at gmail.com>

Jason Ekstrand (9):
  vc4: Do all uniform loads with byte offsets
  nir: Get rid of *_indirect variants of input/output load/store
  nir/glsl: Stop handling UBO/SSBO load/stores differently depending on
  nir/lower_io: Get rid of load/store_foo_indirect
  i965/fs: Get rid of load/store_foo_indirect
  i965/vec4: Get rid of load/store_foo_indirect
  tgsi_to_nir: Get rid of load/store_foo_indirect
  ir3/nir: Use the new unified io intrinsics
  vc4/nir: Use the new unified io intrinsics

 src/gallium/auxiliary/nir/tgsi_to_nir.c            |  51 +++----
 .../drivers/freedreno/ir3/ir3_compiler_nir.c       |  79 ++++++-----
 src/gallium/drivers/vc4/vc4_nir_lower_io.c         |  33 ++---
 src/gallium/drivers/vc4/vc4_program.c              |  28 ++--
 src/glsl/nir/glsl_to_nir.cpp                       |  47 +------
 src/glsl/nir/nir.h                                 |   2 +-
 src/glsl/nir/nir_intrinsics.h                      |  81 +++++------
 src/glsl/nir/nir_lower_io.c                        | 111 ++++++---------
 src/glsl/nir/nir_lower_phis_to_scalar.c            |   4 -
 src/glsl/nir/nir_print.c                           |   9 +-
 src/mesa/drivers/dri/i965/brw_fs.h                 |   2 +-
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp           | 153 ++++++++++-----------
 src/mesa/drivers/dri/i965/brw_nir.c                |  45 ++++--
 src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp      |   7 +-
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp         |  91 +++++-------
 15 files changed, 340 insertions(+), 403 deletions(-)


More information about the mesa-dev mailing list