From e369a0eb41a07929fa53193e930190397084eb51 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 24 Jun 2015 20:38:52 -0700 Subject: [PATCH] nir/spirv: Use vtn_ssa_value for texture coordinates --- src/glsl/nir/spirv_to_nir.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index 8394ab7bd66..37334edd0df 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -776,15 +776,13 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, case SpvOpTextureGather: case SpvOpTextureGatherOffset: case SpvOpTextureGatherOffsets: - case SpvOpTextureQueryLod: { + case SpvOpTextureQueryLod: /* All these types have the coordinate as their first real argument */ - struct vtn_value *coord = vtn_value(b, w[4], vtn_value_type_ssa); - coord_components = glsl_get_vector_elements(coord->type); - p->src = nir_src_for_ssa(coord->ssa); + coord_components = glsl_get_vector_elements(b->values[w[4]].type); + p->src = nir_src_for_ssa(vtn_ssa_value(b, w[4])); p->src_type = nir_tex_src_coord; p++; break; - } default: break; } -- 2.30.2