From: Connor Abbott <cwabbo...@gmail.com> This series grew out of trying to get rid of the copy-n-pasted index calculation code in radv's NIR-to-LLVM path, in particular in radv_get_deref_offset(). I realized for IO it's probably better to switch to using nir_lower_io after Nicolai's series, but for local variables and shared variables which can't be accessed by the host and don't have to match between stages, it's simpler to translate the NIR variable directly into an LLVM variable instead.
This cleanup gives us indirect addressing of local variables without generating if-ladders in NIR for free, and makes our shared variable handling much better which fixes an upcoming Feral title. It should also let LLVM do its thing much better, even better than the existing radeonsi path, by preserving type information that TGSI doesn't for local variables. Connor Abbott (6): nir: don't segfault when printing variables with no name nir/lower_io_to_temporaries: don't set compact on shadow vars ac/nir: rewrite local variable handling ac/nir: rewrite shared variable handling radv: reorder and add passes to match i965 radv: don't lower indirect derefs src/amd/common/ac_nir_to_llvm.c | 310 +++++++++++++------------ src/amd/vulkan/radv_pipeline.c | 28 ++- src/compiler/nir/nir_lower_io_to_temporaries.c | 1 + src/compiler/nir/nir_print.c | 2 +- 4 files changed, 187 insertions(+), 154 deletions(-) -- 2.9.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev