gallivm/nir: lower implicit lod to tex.

Fixes some sampling issues in vertex shaders

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4560>
This commit is contained in:
Dave Airlie
2020-04-08 09:04:50 +10:00
parent c494ed0467
commit e20b3b3720

View File

@@ -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);
}