const struct glsl_type *type;
- /* The value that declares this type. Used for finding decorations */
- struct vtn_value *val;
+ /* The SPIR-V id of the given type. */
+ uint32_t id;
/* Specifies the length of complex types.
*
vtn_foreach_decoration(b, val, var_is_patch_cb, &var->patch);
if (glsl_type_is_array(var->type->type) &&
glsl_type_is_struct(without_array->type)) {
- vtn_foreach_decoration(b, without_array->val,
+ vtn_foreach_decoration(b, vtn_value(b, without_array->id,
+ vtn_value_type_type),
var_is_patch_cb, &var->patch);
}
/* For inputs and outputs, we need to grab locations and builtin
* information from the interface type.
*/
- vtn_foreach_decoration(b, interface_type->val, var_decoration_cb, var);
+ vtn_foreach_decoration(b, vtn_value(b, interface_type->id,
+ vtn_value_type_type),
+ var_decoration_cb, var);
break;
}