mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 19:50:12 +01:00
nir/spirv: Add a vtn_untyped_value helper
This commit is contained in:
parent
01f3aa9c51
commit
5045efa4aa
1 changed files with 10 additions and 3 deletions
|
|
@ -91,13 +91,20 @@ vtn_push_value(struct vtn_builder *b, uint32_t value_id,
|
|||
return &b->values[value_id];
|
||||
}
|
||||
|
||||
static struct vtn_value *
|
||||
vtn_untyped_value(struct vtn_builder *b, uint32_t value_id)
|
||||
{
|
||||
assert(value_id < b->value_id_bound);
|
||||
return &b->values[value_id];
|
||||
}
|
||||
|
||||
static struct vtn_value *
|
||||
vtn_value(struct vtn_builder *b, uint32_t value_id,
|
||||
enum vtn_value_type value_type)
|
||||
{
|
||||
assert(value_id < b->value_id_bound);
|
||||
assert(b->values[value_id].value_type == value_type);
|
||||
return &b->values[value_id];
|
||||
struct vtn_value *val = vtn_untyped_value(b, value_id);
|
||||
assert(val->value_type == value_type);
|
||||
return val;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue