nir: remove bogus logic to allow cube + offset to work

This was done for an a4xx hack which is now removed. No API allows cube
texturing to have offsets.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14670>
This commit is contained in:
Ilia Mirkin 2021-11-14 01:01:47 -05:00 committed by Marge Bot
parent 37306ba3f1
commit 8ed07c0da9

View file

@ -3365,13 +3365,8 @@ nir_tex_instr_src_size(const nir_tex_instr *instr, unsigned src)
return instr->coord_components;
}
/* Usual APIs don't allow cube + offset, but we allow it, with 2 coords for
* the offset, since a cube maps to a single face.
*/
if (instr->src[src].src_type == nir_tex_src_offset) {
if (instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE)
return 2;
else if (instr->is_array)
if (instr->is_array)
return instr->coord_components - 1;
else
return instr->coord_components;