summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-28 02:50:33 -0700
committerJason Ekstrand <[email protected]>2017-07-18 09:43:12 -0700
commit182950ceaf9034e0f6f6e641784af2641d8d178f (patch)
tree879a69a5220c2f211912a3ba74e7d00583f1929e /src/compiler/spirv/vtn_variables.c
parent868456fbf7418f318ea965c2ce151781dbe42e67 (diff)
nir/spirv: Add a helper for pushing SSA values
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c5
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;
}