diff options
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index a9ba39247c8..a9e2dbfaa04 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1774,6 +1774,8 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, } case SpvOpLoad: { + struct vtn_type *res_type = + vtn_value(b, w[1], vtn_value_type_type)->type; struct vtn_pointer *src = vtn_value(b, w[3], vtn_value_type_pointer)->pointer; @@ -1783,8 +1785,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, return; } - struct vtn_value *val = vtn_push_value(b, w[2], vtn_value_type_ssa); - val->ssa = vtn_variable_load(b, src); + vtn_push_ssa(b, w[2], res_type, vtn_variable_load(b, src)); break; } |