From af74ce5a19315284f229277b44b84bede5be4d99 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 21 Dec 2015 21:20:50 -0800 Subject: [PATCH] spirv/nir: Handle non-vector extractions in vtn_composite_extract --- src/glsl/nir/spirv_to_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index d56f9be4447..23c2c481153 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -2824,6 +2824,8 @@ vtn_composite_extract(struct vtn_builder *b, struct vtn_ssa_value *src, ret->type = glsl_scalar_type(glsl_get_base_type(cur->type)); ret->def = vtn_vector_extract(b, cur->def, indices[i]); return ret; + } else { + cur = cur->elems[indices[i]]; } } -- 2.30.2