nir: add callback to nir_remove_dead_variables()
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 28 May 2020 00:59:28 +0000 (10:59 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 02:22:23 +0000 (02:22 +0000)
commit04dbf709edf069bc720d941fab27c53269336bcf
treee3c561c6c20d201d7b6cd2da5336afff921807e6
parentbc79442f3fa23ecb40fcc67ea3cf4fd73fb0d3fe
nir: add callback to nir_remove_dead_variables()

This allows us to do API specific checks before removing variable
without filling nir_remove_dead_variables() with API specific code.

In the following patches we will use this to support the removal
of dead uniforms in GLSL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
23 files changed:
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_shader.c
src/broadcom/compiler/vir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_remove_dead_variables.c
src/compiler/spirv/spirv_to_nir.c
src/freedreno/ir3/ir3_nir.c
src/freedreno/vulkan/tu_shader.c
src/gallium/auxiliary/gallivm/lp_bld_nir.c
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/lima_program.c
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
src/gallium/drivers/r600/sfn/sfn_nir.cpp
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/v3d/v3d_program.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/zink/zink_compiler.c
src/intel/blorp/blorp.c
src/intel/compiler/brw_nir.c
src/intel/vulkan/anv_pipeline.c
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/state_tracker/st_glsl_to_nir.cpp