diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 10:14:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-20 10:15:30 +0000 |
commit | 9329d8755981989ccbe66df6085fbab7c809a2c6 (patch) | |
tree | 48b3252389bf8e1ecbbe9ef49133e403ac2147cf | |
parent | c9263f192e2f85dd961bc1c4e9ca8180db874517 (diff) |
sna: Make DEBUG_SYNC a configure option
As it is advisable to combined the synchronous rendering debug option
with other debugging options, it is more convenient to make it into a
configure option: --enable-debug=sync
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-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"); |