diff options
author | Jason Ekstrand <[email protected]> | 2015-05-01 11:27:44 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-31 16:58:20 -0700 |
commit | 4fa1366392ef3c9779ffe265bd6c39bd483249de (patch) | |
tree | 1b5cb93fb93dcdcc61b3f60908589a75f8eeec3d | |
parent | e709a4ebb8d3ebcdd101899223dd239b647a540b (diff) |
nir/spirv: Add a vtn_untyped_value helper
-rw-r--r-- | src/glsl/nir/spirv_to_nir.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index abcdd66a4f7..a71119fe524 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -92,14 +92,21 @@ vtn_push_value(struct vtn_builder *b, uint32_t value_id, } static struct vtn_value * -vtn_value(struct vtn_builder *b, uint32_t value_id, - enum vtn_value_type value_type) +vtn_untyped_value(struct vtn_builder *b, uint32_t value_id) { assert(value_id < b->value_id_bound); - assert(b->values[value_id].value_type == value_type); 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) +{ + struct vtn_value *val = vtn_untyped_value(b, value_id); + assert(val->value_type == value_type); + return val; +} + static char * vtn_string_literal(struct vtn_builder *b, const uint32_t *words, unsigned word_count) |