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))) {