spirv: Record the type of functions

Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand 2018-03-22 18:44:06 -07:00
parent 2f9bfd7dd9
commit 3fc3798677
2 changed files with 4 additions and 2 deletions

View file

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

View file

@ -221,6 +221,8 @@ struct vtn_block {
struct vtn_function {
struct exec_node node;
struct vtn_type *type;
bool referenced;
bool emitted;