From: Alyssa Rosenzweig Date: Thu, 19 Dec 2019 16:12:50 +0000 (-0500) Subject: pan/midgard: Lower txd with lower_tex X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c57337bbd3e3620bcb0f38d23f43ea58c382737d;p=mesa.git pan/midgard: Lower txd with lower_tex This is a hack since we do have native gradient stuff, but for the moment I'm more interested in conformance and the lowered code is good enough. Fixes dEQP-GLES3.functional.shaders.texture_functions.texturegrad.sampler2d_fixed_fragment Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Tested-by: Marge Bot Part-of: --- diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index ab62770c69e..1e28b08e77d 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -494,7 +494,6 @@ optimise_nir(nir_shader *nir, unsigned quirks) (nir->options->lower_flrp64 ? 64 : 0); NIR_PASS(progress, nir, nir_lower_regs_to_ssa); - NIR_PASS(progress, nir, midgard_nir_lower_fdot2); NIR_PASS(progress, nir, nir_lower_idiv, nir_lower_idiv_fast); nir_lower_tex_options lower_tex_options = { @@ -502,10 +501,16 @@ optimise_nir(nir_shader *nir, unsigned quirks) .lower_txp = ~0, .lower_tex_without_implicit_lod = (quirks & MIDGARD_EXPLICIT_LOD), + + /* TODO: we have native gradient.. */ + .lower_txd = true, }; NIR_PASS(progress, nir, nir_lower_tex, &lower_tex_options); + /* Must lower fdot2 after tex is lowered */ + NIR_PASS(progress, nir, midgard_nir_lower_fdot2); + /* T720 is broken. */ if (quirks & MIDGARD_BROKEN_LOD)