diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/sna/kgem.c | 6 | ||||
-rw-r--r-- | src/sna/sna.h | 1 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 4 |
4 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index ff264623..e93fd886 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,9 @@ if test "x$DEBUG" != xno; then AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) fi fi +if test "x$DEBUG" = xsync; then + AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging]) +fi if test "x$DEBUG" = xmemory; then AC_DEFINE(DEBUG_MEMORY,1,[Enable memory debugging]) fi diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 89558af0..49815e7e 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -75,6 +75,10 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags); #define DBG_NO_HANDLE_LUT 0 #define DBG_DUMP 0 +#ifndef DEBUG_SYNC +#define DEBUG_SYNC 0 +#endif + #define SHOW_BATCH 0 #ifndef USE_FASTRELOC @@ -2650,7 +2654,7 @@ void _kgem_submit(struct kgem *kgem) ret = 0; } - if (DEBUG_FLUSH_SYNC && ret == 0) { + if (DEBUG_SYNC && ret == 0) { struct drm_i915_gem_set_domain set_domain; DBG(("%s: debug sync, starting\n", __FUNCTION__)); diff --git a/src/sna/sna.h b/src/sna/sna.h index 8304f424..2ba5fe43 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -82,7 +82,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DEBUG_NO_BLT 0 #define DEBUG_FLUSH_BATCH 0 -#define DEBUG_FLUSH_SYNC 0 #define TEST_ALL 0 #define TEST_ACCEL (TEST_ALL || 0) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index dff29010..a0707ed6 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -1141,6 +1141,10 @@ Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num) xf86DrvMsg(scrn->scrnIndex, X_INFO, "SNA compiled with assertions enabled\n"); #endif +#if DEBUG_SYNC + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "SNA compiled with synchronous rendering\n"); +#endif #if DEBUG_MEMORY xf86DrvMsg(scrn->scrnIndex, X_INFO, "SNA compiled with memory allocation reporting enabled\n"); |