From: Dave Airlie Date: Tue, 7 Apr 2020 23:04:50 +0000 (+1000) Subject: gallivm/nir: lower implicit lod to tex. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e20b3b37202eb775009c7a62d98515f49cda6e61;p=mesa.git gallivm/nir: lower implicit lod to tex. Fixes some sampling issues in vertex shaders Reviewed-by: Roland Scheidegger Part-of: --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index b0ab9265157..8336d7b2c99 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); }