diff options
author | Jason Ekstrand <[email protected]> | 2018-12-14 11:21:50 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-01-08 00:38:29 +0000 |
commit | a700a82bdac19433533ccf31ab635350cb58203b (patch) | |
tree | 6952630c4fcc7217e3d10cb3931ced29f551aad6 /src/mesa | |
parent | c9a4135e1486766b85437201fec26d467b44705a (diff) |
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 <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index cbce4661e92..5d74524be79 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -253,8 +253,7 @@ st_nir_assign_uniform_locations(struct gl_context *ctx, * UBO's have their own address spaces, so don't count them towards the * number of global uniforms */ - if ((uniform->data.mode == nir_var_uniform || uniform->data.mode == nir_var_shader_storage) && - uniform->interface_type != NULL) + if (uniform->data.mode == nir_var_ubo || uniform->data.mode == nir_var_ssbo) continue; const struct glsl_type *type = glsl_without_array(uniform->type); |