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=5045efa4aa2bd335b2b0110b6af792fbc4fcba7e;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 8e043100c37..7f74c9708d9 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)