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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user