Module: Mesa Branch: master Commit: bda2bb31b13d540ff0730fbc3e9ef5f21fdb9181 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bda2bb31b13d540ff0730fbc3e9ef5f21fdb9181
Author: Alyssa Rosenzweig <[email protected]> Date: Thu Nov 21 08:45:27 2019 -0500 pan/midgard: Enable LOD lowering only on buggy chips T720 and earlier need this workaround, so check the quirk before lowering. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> --- src/panfrost/midgard/midgard_compile.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index cf7d15a0f9f..91cba1c1d54 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -485,7 +485,7 @@ midgard_nir_lower_fdot2(nir_shader *shader) /* Flushes undefined values to zero */ static void -optimise_nir(nir_shader *nir) +optimise_nir(nir_shader *nir, unsigned quirks) { bool progress; unsigned lower_flrp = @@ -504,6 +504,11 @@ optimise_nir(nir_shader *nir) NIR_PASS(progress, nir, nir_lower_tex, &lower_tex_options); + /* T720 is broken. */ + + if (quirks & MIDGARD_BROKEN_LOD) + NIR_PASS_V(nir, midgard_nir_lod_errata); + do { progress = false; @@ -2481,7 +2486,7 @@ midgard_compile_shader_nir(nir_shader *nir, midgard_program *program, bool is_bl /* Optimisation passes */ - optimise_nir(nir); + optimise_nir(nir, ctx->quirks); if (midgard_debug & MIDGARD_DBG_SHADERS) { nir_print_shader(nir, stdout); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
