From: Jason Ekstrand Date: Fri, 1 May 2015 18:27:44 +0000 (-0700) Subject: nir/spirv: Add a vtn_untyped_value helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fa1366392ef3c9779ffe265bd6c39bd483249de;p=mesa.git nir/spirv: Add a vtn_untyped_value helper --- 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)