From 0c9e7a67f92ab1c2ba7ed1e3fb9a647bd1f811ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 2 Jan 2020 15:34:00 -0500 Subject: [PATCH] radeonsi: add AMD_DEBUG=nodmaclear for debugging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Pierre-Eric Pelloux-Prayer Reviewed-By: Timur Kristóf --- src/gallium/drivers/radeonsi/si_dma_cs.c | 3 ++- src/gallium/drivers/radeonsi/si_pipe.c | 1 + src/gallium/drivers/radeonsi/si_pipe.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_dma_cs.c b/src/gallium/drivers/radeonsi/si_dma_cs.c index c550a62ee0b..9cb192307a2 100644 --- a/src/gallium/drivers/radeonsi/si_dma_cs.c +++ b/src/gallium/drivers/radeonsi/si_dma_cs.c @@ -75,7 +75,8 @@ void si_sdma_clear_buffer(struct si_context *sctx, struct pipe_resource *dst, assert(size); assert(size % 4 == 0); - if (!cs || dst->flags & PIPE_RESOURCE_FLAG_SPARSE) { + if (!cs || dst->flags & PIPE_RESOURCE_FLAG_SPARSE || + sctx->screen->debug_flags & DBG(NO_SDMA_CLEARS)) { sctx->b.clear_buffer(&sctx->b, dst, offset, size, &clear_value, 4); return; } diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 3bea85cf8dc..9c26da9d49c 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -87,6 +87,7 @@ static const struct debug_named_value debug_options[] = { /* Driver options: */ { "forcedma", DBG(FORCE_SDMA), "Use SDMA for all operations when possible." }, { "nodma", DBG(NO_SDMA), "Disable SDMA" }, + { "nodmaclear", DBG(NO_SDMA_CLEARS), "Disable SDMA clears" }, { "nowc", DBG(NO_WC), "Disable GTT write combining" }, { "check_vm", DBG(CHECK_VM), "Check VM faults and dump debug info." }, { "reserve_vmid", DBG(RESERVE_VMID), "Force VMID reservation per context." }, diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index 1f64f77342f..0aef94b0a2b 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -168,6 +168,7 @@ enum { /* Driver options: */ DBG_FORCE_SDMA, DBG_NO_SDMA, + DBG_NO_SDMA_CLEARS, DBG_NO_WC, DBG_CHECK_VM, DBG_RESERVE_VMID, -- 2.30.2