Module: Mesa Branch: main Commit: 43eb5e777e4b64fe1b143822ae8aaf709eaad42f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43eb5e777e4b64fe1b143822ae8aaf709eaad42f
Author: Lucas Stach <[email protected]> Date: Thu Aug 25 14:16:37 2022 +0200 etnaviv: add debug option to disable linear PE feature Linear PE has already shown to have some rough corner cases in the hardware and also has performance implications. Add a debug option to allow to disable the feature, so users can more easily check if some issue is caused by this feature. CC: mesa-stable #22.2 Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Guido Günther <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18232> --- src/gallium/drivers/etnaviv/etnaviv_debug.h | 1 + src/gallium/drivers/etnaviv/etnaviv_screen.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h b/src/gallium/drivers/etnaviv/etnaviv_debug.h index 925d50d4b6d..92315b15f73 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_debug.h +++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h @@ -56,6 +56,7 @@ #define ETNA_DBG_NO_SINGLEBUF 0x1000000 /* disable single buffer feature */ #define ETNA_DBG_DEQP 0x2000000 /* Hacks to run dEQP GLES3 tests */ #define ETNA_DBG_NOCACHE 0x4000000 /* Disable shader cache */ +#define ETNA_DBG_NO_LINEAR_PE 0x8000000 /* Disable linear PE */ 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 34f7833663e..6627a8ce58e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -74,6 +74,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"}, DEBUG_NAMED_VALUE_END }; @@ -1116,6 +1117,8 @@ 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)) + screen->features[viv_chipMinorFeatures2] &= ~chipMinorFeatures2_LINEAR_PE; pscreen->destroy = etna_screen_destroy; pscreen->get_param = etna_screen_get_param;
