spirv: Store the id of the type in vtn_type

Previously, we were storing a pointer to the vtn_value because we use it
to look up decorations when we create input/output variables.  This
works, but it also may be useful to have the id itself so we may as well
store that instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2018-01-03 08:41:42 -08:00
parent 53265c8798
commit 8bad7f33c6
3 changed files with 8 additions and 5 deletions

View File

@@ -928,7 +928,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
struct vtn_value *val = vtn_push_value(b, w[1], vtn_value_type_type);
val->type = rzalloc(b, struct vtn_type);
val->type->val = val;
val->type->id = w[1];
switch (opcode) {
case SpvOpTypeVoid: