[Mesa-dev] [PATCH 10/16] spirv/nir: Don't increment coord_components for array lod queries
Jason Ekstrand
jason at jlekstrand.net
Fri Jul 22 04:21:58 UTC 2016
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 <jason at jlekstrand.net>
Cc: "12.0" <mesa-dev at lists.freedesktop.org>
---
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 b1bb48b..6654f5f 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;
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list