summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 1ff7427ffb9..5af27bfdb11 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -233,6 +233,8 @@ vtn_pointer_for_variable(struct vtn_builder *b,
pointer->mode = var->mode;
pointer->type = var->type;
+ assert(ptr_type->base_type == vtn_base_type_pointer);
+ assert(ptr_type->deref->type == var->type->type);
pointer->ptr_type = ptr_type;
pointer->var = var;