spirv: Add a vtn_constant_value helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
9779f34326
commit
de518f38e5
1 changed files with 6 additions and 0 deletions
|
|
@ -639,6 +639,12 @@ bool
|
|||
vtn_set_instruction_result_type(struct vtn_builder *b, SpvOp opcode,
|
||||
const uint32_t *w, unsigned count);
|
||||
|
||||
static inline nir_constant *
|
||||
vtn_constant_value(struct vtn_builder *b, uint32_t value_id)
|
||||
{
|
||||
return vtn_value(b, value_id, vtn_value_type_constant)->constant;
|
||||
}
|
||||
|
||||
struct vtn_ssa_value *vtn_ssa_value(struct vtn_builder *b, uint32_t value_id);
|
||||
|
||||
struct vtn_ssa_value *vtn_create_ssa_value(struct vtn_builder *b,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue