From a10d59c09abdaad19e2d6bbf70d9b2d4b36925db Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 6 Nov 2015 16:53:27 -0800 Subject: [PATCH] nir/spirv: Increment num_ubos/ssbos when creating variables --- src/glsl/nir/spirv_to_nir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index fc85c19a7a7..a06cffcefdc 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -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: -- 2.30.2