From e20b3b37202eb775009c7a62d98515f49cda6e61 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 8 Apr 2020 09:04:50 +1000 Subject: [PATCH] gallivm/nir: lower implicit lod to tex. Fixes some sampling issues in vertex shaders Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index b0ab926..8336d7b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -1875,6 +1875,9 @@ void lp_build_opt_nir(struct nir_shader *nir) NIR_PASS_V(nir, nir_opt_constant_folding); NIR_PASS_V(nir, nir_opt_algebraic); NIR_PASS_V(nir, nir_lower_pack); + + nir_lower_tex_options options = { .lower_tex_without_implicit_lod = true }; + NIR_PASS_V(nir, nir_lower_tex, &options); } while (progress); nir_lower_bool_to_int32(nir); } -- 2.7.4