summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-29 10:33:40 -0700
committerJason Ekstrand <[email protected]>2017-07-05 15:26:56 -0700
commitab1939aea8ff10d2e8b7d579575068ec11f60030 (patch)
tree3eb1ef905fe9ac9d0825a16b8041a20bd119c391 /src/compiler/spirv/vtn_variables.c
parent0bdc622d431ba15c8ef5ab2ef08790e2e7554eff (diff)
nir/spirv: Rework function argument setup
Now that we have proper pointer types, we can be more sensible about the way we set up function arguments and deal with the two cases of pointer vs. SSA parameters distinctly. Reviewed-by: Connor Abbott <[email protected]>
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;