From: Jason Ekstrand Date: Thu, 21 Jul 2016 03:57:37 +0000 (-0700) Subject: spirv/nir: Don't increment coord_components for array lod queries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34a39e91bac2c2f12389cded943019b79c7a9a06;p=mesa.git 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" --- 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;