From 5177ffed6562a06b3e6ab83c31baad3cc0f21db6 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Jun 2020 17:01:26 +1000 Subject: [PATCH] gallivm/nir: lower tg4 offsets. Fixes: dEQP-VK.glsl.texture_gather.offsets.* Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index f407f6204c0..4c919e7a98f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2016,6 +2016,12 @@ bool lp_build_nir_llvm( void lp_build_opt_nir(struct nir_shader *nir) { bool progress; + + static const struct nir_lower_tex_options lower_tex_options = { + .lower_tg4_offsets = true, + }; + NIR_PASS_V(nir, nir_lower_tex, &lower_tex_options); + do { progress = false; NIR_PASS_V(nir, nir_opt_constant_folding); -- 2.30.2