util: Add adaptive_sync driconf option
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 23 Oct 2018 15:38:49 +0000 (11:38 -0400)
committerMichel Dänzer <michel@daenzer.net>
Fri, 28 Dec 2018 15:38:06 +0000 (16:38 +0100)
This option lets the user decide whether mesa should notify the
window manager / DDX driver that the current application is adaptive
sync capable.

It's off by default.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
src/util/xmlpool/t_options.h

index e0a30f5fd1da23fd5b1bfd3362958383800357c5..80ddf0e203ec31a2e6d19a682d9c745df719e229 100644 (file)
@@ -210,6 +210,11 @@ DRI_CONF_OPT_BEGIN_V(vblank_mode,enum,def,"0:3") \
         DRI_CONF_DESC_END \
 DRI_CONF_OPT_END
 
+#define DRI_CONF_ADAPTIVE_SYNC(def) \
+DRI_CONF_OPT_BEGIN_B(adaptive_sync,def) \
+        DRI_CONF_DESC(en,gettext("Adapt the monitor sync to the application performance (when possible)")) \
+DRI_CONF_OPT_END
+
 #define DRI_CONF_MESA_GLTHREAD(def) \
 DRI_CONF_OPT_BEGIN_B(mesa_glthread, def) \
         DRI_CONF_DESC(en,gettext("Enable offloading GL driver work to a separate thread")) \