nir: Distinguish between normal uniforms and UBOs
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 14 Dec 2018 17:21:50 +0000 (11:21 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:29 +0000 (00:38 +0000)
commita700a82bdac19433533ccf31ab635350cb58203b
tree6952630c4fcc7217e3d10cb3931ced29f551aad6
parentc9a4135e1486766b85437201fec26d467b44705a
nir: Distinguish between normal uniforms and UBOs

Previously, NIR had a single nir_var_uniform mode used for atomic
counters, UBOs, samplers, images, and normal uniforms.  This commit
splits this into nir_var_uniform and nir_var_ubo where nir_var_uniform
is still a bit of a catch-all but the nir_var_ubo is specific to UBOs.
While we're at it, we also rename shader_storage to ssbo to follow the
convention.

We need this so that we can distinguish between normal uniforms and UBO
access at the deref level without going all the way back variable and
seeing if it has an interface type.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
13 files changed:
src/compiler/glsl/gl_nir_lower_atomics.c
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_atomics_to_ssbo.c
src/compiler/nir/nir_lower_io.c
src/compiler/nir/nir_opt_copy_prop_vars.c
src/compiler/nir/nir_opt_dead_write_vars.c
src/compiler/nir/nir_print.c
src/compiler/nir/tests/vars_tests.cpp
src/compiler/spirv/vtn_variables.c
src/gallium/drivers/radeonsi/si_shader_nir.c
src/mesa/state_tracker/st_glsl_to_nir.cpp