From 8ed07c0da90b98cc53fbed1b387027a34d09b042 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 14 Nov 2021 01:01:47 -0500 Subject: [PATCH] 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 Part-of: --- src/compiler/nir/nir.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index bd87c6e..5c93019 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -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; -- 2.7.4