nir/spirv: Increment num_ubos/ssbos when creating variables
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 7 Nov 2015 00:53:27 +0000 (16:53 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 7 Nov 2015 00:53:27 +0000 (16:53 -0800)
src/glsl/nir/spirv_to_nir.c

index fc85c19a7a77a68186d0d9956c6c9f9973abd78b..a06cffcefdc6144801abfa807d42944ca2cf1912 100644 (file)
@@ -1364,10 +1364,13 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
       case SpvStorageClassUniformConstant:
          if (interface_type && interface_type->buffer_block) {
             var->data.mode = nir_var_shader_storage;
+            b->shader->info.num_ssbos++;
          } else {
             /* UBO's and samplers */
             var->data.mode = nir_var_uniform;
             var->data.read_only = true;
+            if (interface_type)
+               b->shader->info.num_ubos++;
          }
          break;
       case SpvStorageClassPushConstant: