From 34a39e91bac2c2f12389cded943019b79c7a9a06 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 20 Jul 2016 20:57:37 -0700 Subject: spirv/nir: Don't increment coord_components for array lod queries For lod query instructions, we really don't care whether or not the sampler is an array type because that doesn't factor into the LOD. Signed-off-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Cc: "12.0" --- src/compiler/spirv/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index b1bb48be577..6654f5f7c6d 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -1511,7 +1511,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, assert("Invalid sampler type"); } - if (instr->is_array) + if (instr->is_array && instr->op != nir_texop_lod) instr->coord_components++; } else { instr->coord_components = 0; -- cgit v1.2.3