summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-06 16:53:27 -0800
committerJason Ekstrand <[email protected]>2015-11-06 16:53:27 -0800
commita10d59c09abdaad19e2d6bbf70d9b2d4b36925db (patch)
tree158df41272546f07510c0d8e5c31cfa5c4cece86
parent046563167ca9a608474a1c582087fdaf54bd9083 (diff)
nir/spirv: Increment num_ubos/ssbos when creating variables
-rw-r--r--src/glsl/nir/spirv_to_nir.c3
1 files changed, 3 insertions, 0 deletions
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: