I see that
visit_load_var() in ~/mesa/src/amd/llvm/ac_nir_to_llvm.c
assumes that nir_variable used in this intrinsic can have few specific mods
only.
For example variable can not have nir_var_mem_shared , if such mod
encountered it will execute unreachable() code.
Is there any nir pass that need
First off, I should point out that the AMD NIR -> LLVM translator is,
as far as I know, the only NIR back-end that consumes variables at
all. Most back-ends assume that all variable access is completely
lowered away before the back-end ever sees it. How this is done
depends on the variable mode.
Possibly worth noting as another point for reference is that zink also uses
variables.
On Sun, Oct 11, 2020, 11:08 AM Jason Ekstrand wrote:
> First off, I should point out that the AMD NIR -> LLVM translator is,
> as far as I know, the only NIR back-end that consumes variables at
> all. Most ba
Hi,
I'd like to complement Jason's excellent answer with some code
examples.
ac_nir_to_llvm is used by two drivers, RADV and RadeonSI.
Each of them have a driver-specific implementation of the shader ABI.
For RADV's implementation, take a look at llvm_compile_shader in
radv_nir_to_llvm.c and to