diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-02-09 22:21:20 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-02-09 22:21:20 +0000 |
commit | 5ec38fb2ea68e1bedbf85101843b92eacbd1af66 (patch) | |
tree | 9ee702fbfc59594d4f59435f72df93dbdc0f29c0 | |
parent | 11c0215bf8afcb8c578f0b5eb850d3ef28c619b5 (diff) |
Turn DBG output on/off with INTEL_DEBUG=bufs
-rw-r--r-- | src/mesa/drivers/dri/i915/bufmgr.h | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 18 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/bufmgr.h b/src/mesa/drivers/dri/i915/bufmgr.h index 3761a82b59..64affa0969 100644 --- a/src/mesa/drivers/dri/i915/bufmgr.h +++ b/src/mesa/drivers/dri/i915/bufmgr.h @@ -158,7 +158,9 @@ void bmFlushDrawCache( struct bufmgr *bm ); void bm_fake_NotifyContendedLockTake( struct bufmgr * ); +extern int INTEL_DEBUG; +#define DEBUG_BUFMGR 0x2000 -#define DBG(...) do { if (0) _mesa_printf(__VA_ARGS__); } while(0) +#define DBG(...) do { if (INTEL_DEBUG & DEBUG_BUFMGR) _mesa_printf(__VA_ARGS__); } while(0) #endif diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index a005476a94..832588c3d4 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -55,6 +55,8 @@ #include "intel_ioctl.h" #include "intel_batchbuffer.h" +#include "bufmgr.h" + #include "utils.h" #ifndef INTEL_DEBUG int INTEL_DEBUG = (0); @@ -237,6 +239,7 @@ static const struct dri_debug_control debug_control[] = { "sync", DEBUG_SYNC }, { "sleep", DEBUG_SLEEP }, { "pix", DEBUG_PIXEL }, + { "buf", DEBUG_BUFMGR }, { NULL, 0 } }; @@ -581,13 +584,6 @@ void intelGetLock( intelContextPtr intel, GLuint flags ) __DRIscreenPrivate *sPriv = intel->driScreen; drmI830Sarea * sarea = intel->sarea; int me = intel->hHWContext; - static int foo = 0; - -/* _mesa_printf("%s\n", __FUNCTION__); */ -/* if (foo++ > 1) { */ -/* _mesa_printf("%s - foo\n", __FUNCTION__); */ -/* abort(); */ -/* } */ drmGetLock(intel->driFd, intel->hHWContext, flags); @@ -599,17 +595,15 @@ void intelGetLock( intelContextPtr intel, GLuint flags ) if (dPriv) DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv); - /* If we lost context, need to dump all registers to hardware. - * Note that we don't care about 2d contexts, even if they perform - * accelerated commands, so the DRI locking in the X server is even - * more broken than usual. + /* Lost context? */ - if (sarea->ctxOwner != me) { intel->perf_boxes |= I830_BOX_LOST_CONTEXT; sarea->ctxOwner = me; } + /* Drawable changed? + */ if (dPriv && intel->lastStamp != dPriv->lastStamp) { intelWindowMoved( intel ); intel->lastStamp = dPriv->lastStamp; |