From 72356c713ebd1b7336053c064360ebf99157eeb3 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 21 Dec 2022 14:39:27 +0100 Subject: [PATCH] etnaviv: disable linear PE by default Linear PE causes a lot of issues in the ZS stage. While some of those issues can be worked around on newer GPU cores by doing all ZS operations in the late stage, GC600 r4653 exhibits spurious Z fails when linear PE is active even though this GPU does not even have a early Z stage. Disable linear PE for now, until the issue can be analyzed further. Leave the debug option in place to allow to enable linear PE for testing. Fixes: 43eb5e777e4b ("etnaviv: add debug option to disable linear PE feature") Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Reviewed-by: Marek Vasut Part-of: (cherry picked from commit c5231025beea8e14ac549d62dce43074aa7b3755) --- .pick_status.json | 2 +- src/gallium/drivers/etnaviv/etnaviv_debug.h | 2 +- src/gallium/drivers/etnaviv/etnaviv_screen.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e427eae..f313bd6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -490,7 +490,7 @@ "description": "etnaviv: disable linear PE by default", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "43eb5e777e4b64fe1b143822ae8aaf709eaad42f" }, diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h b/src/gallium/drivers/etnaviv/etnaviv_debug.h index cb816a8..45e4988 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_debug.h +++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h @@ -54,7 +54,7 @@ #define ETNA_DBG_NO_SINGLEBUF 0x400000 /* disable single buffer feature */ #define ETNA_DBG_DEQP 0x800000 /* Hacks to run dEQP GLES3 tests */ #define ETNA_DBG_NOCACHE 0x1000000 /* Disable shader cache */ -#define ETNA_DBG_NO_LINEAR_PE 0x2000000 /* Disable linear PE */ +#define ETNA_DBG_LINEAR_PE 0x2000000 /* Enable linear PE */ #define ETNA_DBG_MSAA 0x4000000 /* Enable MSAA */ extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index d9ae137..795f125 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -72,7 +72,7 @@ static const struct debug_named_value etna_debug_options[] = { {"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"}, {"deqp", ETNA_DBG_DEQP, "Hacks to run dEQP GLES3 tests"}, /* needs MESA_GLES_VERSION_OVERRIDE=3.0 */ {"nocache", ETNA_DBG_NOCACHE, "Disable shader cache"}, - {"no_linear_pe", ETNA_DBG_NO_LINEAR_PE, "Disable linear PE"}, + {"linear_pe", ETNA_DBG_LINEAR_PE, "Enable linear PE"}, {"msaa", ETNA_DBG_MSAA, "Enable MSAA support"}, DEBUG_NAMED_VALUE_END }; @@ -1133,7 +1133,7 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu, screen->specs.can_supertile = 0; if (DBG_ENABLED(ETNA_DBG_NO_SINGLEBUF)) screen->specs.single_buffer = 0; - if (DBG_ENABLED(ETNA_DBG_NO_LINEAR_PE)) + if (!DBG_ENABLED(ETNA_DBG_LINEAR_PE)) screen->features[viv_chipMinorFeatures2] &= ~chipMinorFeatures2_LINEAR_PE; pscreen->destroy = etna_screen_destroy; -- 2.7.4