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 <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-dev@lists.freedesktop.org>
This commit is contained in:
Jason Ekstrand 2016-07-20 20:57:37 -07:00
parent 67b7d876e4
commit 34a39e91ba

View file

@ -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;