From 0e0bf8ed47416e812e86679ae86af75606a2d1af Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 27 Oct 2023 15:37:37 -0400 Subject: [PATCH] gsk: Add a debug flag for graphics offload Add GSK_DEBUG=offload-disable to disable graphics offload via attaching of dmabufs to subsurfaces. This is not used anywhere yet. --- docs/reference/gtk/running.md | 3 +++ gsk/gskdebug.c | 1 + gsk/gskdebugprivate.h | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/reference/gtk/running.md b/docs/reference/gtk/running.md index 3eca483bf1..acabf5bda7 100644 --- a/docs/reference/gtk/running.md +++ b/docs/reference/gtk/running.md @@ -309,6 +309,9 @@ A number of options affect behavior instead of logging: `sync` : Sync after each frame +`offload-disable` +: Disable graphics offload to subsurfaces + `vulkan-staging-image` : Use a staging image for Vulkan texture upload diff --git a/gsk/gskdebug.c b/gsk/gskdebug.c index 252fe17167..e1e6058b1a 100644 --- a/gsk/gskdebug.c +++ b/gsk/gskdebug.c @@ -17,6 +17,7 @@ static const GdkDebugKey gsk_debug_keys[] = { { "full-redraw", GSK_DEBUG_FULL_REDRAW, "Force full redraws" }, { "sync", GSK_DEBUG_SYNC, "Sync after each frame" }, { "staging", GSK_DEBUG_STAGING, "Use a staging image for texture upload (Vulkan only)" }, + { "offload-disable", GSK_DEBUG_OFFLOAD_DISABLE, "Disable graphics offload" }, }; static guint gsk_debug_flags; diff --git a/gsk/gskdebugprivate.h b/gsk/gskdebugprivate.h index 691deafd89..c742492c74 100644 --- a/gsk/gskdebugprivate.h +++ b/gsk/gskdebugprivate.h @@ -19,7 +19,8 @@ typedef enum { GSK_DEBUG_GEOMETRY = 1 << 9, GSK_DEBUG_FULL_REDRAW = 1 << 10, GSK_DEBUG_SYNC = 1 << 11, - GSK_DEBUG_STAGING = 1 << 12 + GSK_DEBUG_STAGING = 1 << 12, + GSK_DEBUG_OFFLOAD_DISABLE = 1 << 13, } GskDebugFlags; #define GSK_DEBUG_ANY ((1 << 13) - 1)