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>
This commit is contained in:
Jason Ekstrand
2018-12-14 11:21:50 -06:00
committed by Jason Ekstrand
parent c9a4135e14
commit a700a82bda
13 changed files with 44 additions and 38 deletions

View File

@@ -100,8 +100,9 @@ typedef enum {
nir_var_global = (1 << 2),
nir_var_local = (1 << 3),
nir_var_uniform = (1 << 4),
nir_var_shader_storage = (1 << 5),
nir_var_ubo = (1 << 5),
nir_var_system_value = (1 << 6),
nir_var_ssbo = (1 << 7),
nir_var_shared = (1 << 8),
nir_var_all = ~0,
} nir_variable_mode;