spirv: Also copy over binding information for atomic counters
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 24 Jul 2020 15:04:48 +0000 (10:04 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Jul 2020 18:17:38 +0000 (18:17 +0000)
I missed this if statement so atomic counters weren't getting bindings
and, when you have more than one of them, that meant they were all
getting combined into one.

Fixes: 3584cb09bc15 "spirv: Give atomic counters their own variable mode"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6060>

src/compiler/spirv/vtn_variables.c

index e4013e940acb13b6e449ca97a453366f4db238f8..2100b481ccef3d1f17649f8514fcb2b89f7bab40 100644 (file)
@@ -2341,7 +2341,8 @@ vtn_create_variable(struct vtn_builder *b, struct vtn_value *val,
 
    if (var->mode == vtn_variable_mode_uniform ||
        var->mode == vtn_variable_mode_ubo ||
-       var->mode == vtn_variable_mode_ssbo) {
+       var->mode == vtn_variable_mode_ssbo ||
+       var->mode == vtn_variable_mode_atomic_counter) {
       /* XXX: We still need the binding information in the nir_variable
        * for these. We should fix that.
        */