aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_private.h
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_private.h
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_private.h')
-rw-r--r--src/compiler/spirv/vtn_private.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h
index 2f96c0904ac..8d745bb4a03 100644
--- a/src/compiler/spirv/vtn_private.h
+++ b/src/compiler/spirv/vtn_private.h
@@ -514,6 +514,15 @@ vtn_push_value(struct vtn_builder *b, uint32_t value_id,
}
static inline struct vtn_value *
+vtn_push_ssa(struct vtn_builder *b, uint32_t value_id,
+ struct vtn_type *type, struct vtn_ssa_value *ssa)
+{
+ struct vtn_value *val = vtn_push_value(b, value_id, vtn_value_type_ssa);
+ val->ssa = ssa;
+ return val;
+}
+
+static inline struct vtn_value *
vtn_untyped_value(struct vtn_builder *b, uint32_t value_id)
{
assert(value_id < b->value_id_bound);