Mesa (main): radeonsi: add a debug option that disables DCC for all exported buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jan 3 17:34:15 UTC 2022
Module: Mesa
Branch: main
Commit: ce723950082e5abc52e5d6c2fa5c5c87cc54d617
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce723950082e5abc52e5d6c2fa5c5c87cc54d617
Author: Marek Olšák <marek.olsak at amd.com>
Date: Tue Dec 21 12:56:38 2021 -0500
radeonsi: add a debug option that disables DCC for all exported buffers
requested internally
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14283>
---
src/gallium/drivers/radeonsi/si_pipe.c | 1 +
src/gallium/drivers/radeonsi/si_pipe.h | 1 +
src/gallium/drivers/radeonsi/si_texture.c | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 1717686fe1d..0cf84499073 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -105,6 +105,7 @@ static const struct debug_named_value radeonsi_debug_options[] = {
{"notiling", DBG(NO_TILING), "Disable tiling"},
{"nodisplaytiling", DBG(NO_DISPLAY_TILING), "Disable display tiling"},
{"nodisplaydcc", DBG(NO_DISPLAY_DCC), "Disable display DCC"},
+ {"noexporteddcc", DBG(NO_EXPORTED_DCC), "Disable DCC for all exported buffers (via DMABUF, etc.)"},
{"nodcc", DBG(NO_DCC), "Disable DCC."},
{"nodccclear", DBG(NO_DCC_CLEAR), "Disable DCC fast clear."},
{"nodccstore", DBG(NO_DCC_STORE), "Disable DCC stores"},
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index 5d6705659e0..939d848fac3 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -237,6 +237,7 @@ enum
DBG_NO_TILING,
DBG_NO_DISPLAY_TILING,
DBG_NO_DISPLAY_DCC,
+ DBG_NO_EXPORTED_DCC,
DBG_NO_DCC,
DBG_NO_DCC_CLEAR,
DBG_NO_DCC_STORE,
diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index 0fe177a4bfe..6feb4e6fd12 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -701,7 +701,8 @@ static bool si_texture_get_handle(struct pipe_screen *screen, struct pipe_contex
* disable it for external clients that want write
* access.
*/
- if ((usage & PIPE_HANDLE_USAGE_SHADER_WRITE && !tex->is_depth && tex->surface.meta_offset) ||
+ if (sscreen->debug_flags & DBG(NO_EXPORTED_DCC) ||
+ (usage & PIPE_HANDLE_USAGE_SHADER_WRITE && !tex->is_depth && tex->surface.meta_offset) ||
/* Displayable DCC requires an explicit flush. */
(!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) &&
si_displayable_dcc_needs_explicit_flush(tex))) {
More information about the mesa-commit
mailing list