mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 20:10:17 +01:00
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 <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
This commit is contained in:
parent
68c2c7962a
commit
bda2bb31b1
1 changed files with 7 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue