diff options
-rw-r--r-- | src/compiler/spirv/vtn_cfg.c | 4 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_private.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index 6e6f221040d..efae35ccc1e 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -56,8 +56,8 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode, struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_function); val->func = b->func; - const struct vtn_type *func_type = - vtn_value(b, w[4], vtn_value_type_type)->type; + b->func->type = vtn_value(b, w[4], vtn_value_type_type)->type; + const struct vtn_type *func_type = b->func->type; vtn_assert(func_type->return_type->type == result_type); diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index bd4d28b4f37..97031632e01 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -221,6 +221,8 @@ struct vtn_block { struct vtn_function { struct exec_node node; + struct vtn_type *type; + bool referenced; bool emitted; |