diff options
author | Eric Anholt <[email protected]> | 2007-11-16 14:56:26 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2007-11-16 15:36:18 -0800 |
commit | 3bd07ba0d4f759e3a17e2a5ed51086b44705a482 (patch) | |
tree | f918f9979d9c297711bc03be838e93a3038103af /src | |
parent | f7e0513d700167a7eff39e40c855027096f1db1d (diff) |
[i915] Add INTEL_DEBUG=sync debug flag to wait for fences after making them.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_batchbuffer.c | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 2b93f60ab4d..a26a424f862 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -245,6 +245,7 @@ static const struct dri_debug_control debug_control[] = { {"reg", DEBUG_REGION}, {"fbo", DEBUG_FBO}, {"lock", DEBUG_LOCK}, + {"sync", DEBUG_SYNC}, {NULL, 0} }; diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h index 7272f8f352b..4bec712f3d0 100644 --- a/src/mesa/drivers/dri/i915/intel_context.h +++ b/src/mesa/drivers/dri/i915/intel_context.h @@ -355,6 +355,7 @@ extern int INTEL_DEBUG; #define DEBUG_REGION 0x400 #define DEBUG_FBO 0x800 #define DEBUG_LOCK 0x1000 +#define DEBUG_SYNC 0x2000 #define DBG(...) do { if (INTEL_DEBUG & FILE_DEBUG_FLAG) _mesa_printf(__VA_ARGS__); } while(0) diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c index 9ec60fcff39..4e698627a36 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c @@ -212,6 +212,12 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch) if (!was_locked) UNLOCK_HARDWARE(intel); + if (INTEL_DEBUG & DEBUG_SYNC) { + fprintf(stderr, "waiting for idle\n"); + if (batch->last_fence != NULL) + dri_fence_wait(batch->last_fence); + } + /* Reset the buffer: */ intel_batchbuffer_reset(batch); |