This has been bothering me for quite some time. We have both regular and *_indirect forms of all of the load/store intrinsics. Unfortunately, these lead to large number of unneeded special-cases. Another downside is that core NIR has no way of turning _indirect load/store operations into their direct form when the indirect is a constant.
All but the last two patches will have to be squashed into one commit before pushing. This includes patches to tgsi_to_nir, ir3, and vc4. It would be much appreciated if the owners of those pieces of code would review and test as quickly as possible. If they're wrong (they probably are), working patches would be appreciated. Cc: Eric Anholt <e...@anholt.net> Cc: Rob Clark <robclark@robdcl...@gmail.com> Jason Ekstrand (10): nir/lower_io: Pass the builder and type_size into get_io_offset i965/vec4: Get rid of the nir_inputs array nir: Get rid of *_indirect variants of input/output load/store intrinsics nir/glsl: Stop handling UBO/SSBO load/stores differently depending on indirect 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 | 48 +++---- .../drivers/freedreno/ir3/ir3_compiler_nir.c | 75 ++++++----- src/gallium/drivers/vc4/vc4_nir_lower_io.c | 20 +-- src/gallium/drivers/vc4/vc4_program.c | 25 ++-- src/glsl/nir/glsl_to_nir.cpp | 47 +------ src/glsl/nir/nir.h | 2 +- src/glsl/nir/nir_intrinsics.h | 64 +++++---- src/glsl/nir/nir_lower_io.c | 121 +++++++---------- src/glsl/nir/nir_lower_phis_to_scalar.c | 4 - src/glsl/nir/nir_print.c | 19 ++- src/mesa/drivers/dri/i965/brw_fs.h | 3 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 145 +++++++++------------ src/mesa/drivers/dri/i965/brw_nir.c | 60 +++++---- src/mesa/drivers/dri/i965/brw_vec4.h | 2 - src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp | 8 +- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 119 ++++++----------- 16 files changed, 331 insertions(+), 431 deletions(-) -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev