spirv/nir: Handle non-vector extractions in vtn_composite_extract
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Dec 2015 05:20:50 +0000 (21:20 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Dec 2015 21:49:56 +0000 (13:49 -0800)
src/glsl/nir/spirv_to_nir.c

index d56f9be44475c490fc3cde1f2f5ce7787fcd2015..23c2c481153a7d020013bd5d10d2764c3a801735 100644 (file)
@@ -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]];
       }
    }