From: Rob Clark <robcl...@freedesktop.org> I went ahead and updated the previous RFC to convert NIR and the NIR producers over to the const_index helpers. I haven't converted the drivers over yet.. it should be straightforward.. but if someone has a different idea about how to clean-up const_index, I'd kinda rather hear about it before I get too far ;-)
The alternative approach would be to simply replace const_index with separate base/wrmask/etc fields (direct access, without helpers needed). But the current approach avoids a flag-day, and we could still replace const_index with separate fields, hidden behind setter/getter helpers, as a later step. This was my original idea (add helpers, convert to helpers, then change struct), but it did occur to me that sticking with const_index will probably do a better job of encouraging people to use the setter/getter helpers, where we have additional asserts to make sure you don't, for ex., try to set a writemask on a load_var. Rob Clark (6): nir: const_index helpers gtn: use const_index helpers ttn: small logic cleanup ttn: use const_index helpers ptn: use const_index helpers nir: use const_index helpers src/gallium/auxiliary/nir/tgsi_to_nir.c | 12 +-- src/glsl/nir/glsl_to_nir.cpp | 17 +-- src/glsl/nir/nir.h | 64 ++++++++++- src/glsl/nir/nir_builder.h | 2 +- src/glsl/nir/nir_intrinsics.c | 10 +- src/glsl/nir/nir_intrinsics.h | 177 ++++++++++++++++--------------- src/glsl/nir/nir_lower_atomics.c | 4 +- src/glsl/nir/nir_lower_clip.c | 8 +- src/glsl/nir/nir_lower_gs_intrinsics.c | 4 +- src/glsl/nir/nir_lower_io.c | 12 +-- src/glsl/nir/nir_lower_locals_to_regs.c | 2 +- src/glsl/nir/nir_lower_two_sided_color.c | 4 +- src/glsl/nir/nir_lower_var_copies.c | 2 +- src/glsl/nir/nir_lower_vars_to_ssa.c | 5 +- src/glsl/nir/nir_print.c | 32 ++++-- src/glsl/nir/nir_validate.c | 2 +- src/mesa/program/prog_to_nir.c | 4 +- 17 files changed, 221 insertions(+), 140 deletions(-) -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev