diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index 3669e6e6fc1..fd62f2f8c63 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -1916,7 +1916,7 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst LLVMBuilderRef builder = gallivm->builder; LLVMValueRef coords[5]; LLVMValueRef offsets[3] = { NULL }; - LLVMValueRef explicit_lod = NULL, projector = NULL, ms_index = NULL; + LLVMValueRef explicit_lod = NULL, ms_index = NULL; struct lp_sampler_params params; struct lp_derivatives derivs; unsigned sample_key = 0; @@ -1963,9 +1963,6 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst case nir_tex_src_sampler_deref: sampler_deref_instr = nir_src_as_deref(instr->src[i].src); break; - case nir_tex_src_projector: - projector = lp_build_rcp(&bld_base->base, cast_type(bld_base, get_src(bld_base, instr->src[i].src), nir_type_float, 32)); - break; case nir_tex_src_comparator: sample_key |= LP_SAMPLER_SHADOW; coords[4] = get_src(bld_base, instr->src[i].src); @@ -2066,13 +2063,6 @@ static void visit_tex(struct lp_build_nir_context *bld_base, nir_tex_instr *inst coords[1] = coord_undef; } - if (projector) { - for (unsigned chan = 0; chan < instr->coord_components; ++chan) - coords[chan] = lp_build_mul(&bld_base->base, coords[chan], projector); - if (sample_key & LP_SAMPLER_SHADOW) - coords[4] = lp_build_mul(&bld_base->base, coords[4], projector); - } - uint32_t samp_base_index = 0, tex_base_index = 0; if (!sampler_deref_instr) { int samp_src_index = nir_tex_instr_src_index(instr, nir_tex_src_sampler_handle); @@ -2337,6 +2327,7 @@ void lp_build_opt_nir(struct nir_shader *nir) static const struct nir_lower_tex_options lower_tex_options = { .lower_tg4_offsets = true, + .lower_txp = ~0u, }; NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options); NIR_PASS_V(nir, nir_lower_frexp);