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 <cwabbott0@gmail.com>
This commit is contained in:
Jason Ekstrand
2017-06-29 10:33:40 -07:00
committed by Jason Ekstrand
parent 0bdc622d43
commit ab1939aea8
3 changed files with 35 additions and 29 deletions

View File

@@ -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;