summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c2
-rw-r--r--src/mesa/drivers/dri/i965/bufmgr.h5
-rw-r--r--src/mesa/drivers/dri/i965/bufmgr_fake.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c3
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.c13
-rw-r--r--src/mesa/drivers/dri/i965/intel_context.h9
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_copy.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_regions.c2
12 files changed, 31 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index b23b3579888..969be594af2 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -48,7 +48,7 @@
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
-
+#define FILE_DEBUG_FLAG DEBUG_BATCH
static GLuint hw_prim[GL_POLYGON+1] = {
_3DPRIM_POINTLIST,
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index 86464b2ec5f..8c73cbbca97 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -39,12 +39,6 @@
#include "macros.h"
#include "mtypes.h"
-
-
-
-
-
-
static GLboolean do_check_fallback(struct brw_context *brw)
{
GLcontext *ctx = &brw->intel.ctx;
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index e306c9cf106..d9e88962521 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -37,6 +37,8 @@
#include "intel_tex_layout.h"
#include "macros.h"
+#define FILE_DEBUG_FLAG DEBUG_MIPTREE
+
GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt )
{
/* XXX: these vary depending on image format:
diff --git a/src/mesa/drivers/dri/i965/bufmgr.h b/src/mesa/drivers/dri/i965/bufmgr.h
index b31c2e6d9bc..c7051b963f6 100644
--- a/src/mesa/drivers/dri/i965/bufmgr.h
+++ b/src/mesa/drivers/dri/i965/bufmgr.h
@@ -183,9 +183,4 @@ void bmFinishFenceLock( struct intel_context *, unsigned fence );
void bm_fake_NotifyContendedLockTake( struct intel_context * );
-extern int INTEL_DEBUG;
-#define DEBUG_BUFMGR 0x10000000
-
-#define DBG(...) do { if (INTEL_DEBUG & DEBUG_BUFMGR) _mesa_printf(__VA_ARGS__); } while(0)
-
#endif
diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c
index 65760c40d47..4315b272e47 100644
--- a/src/mesa/drivers/dri/i965/bufmgr_fake.c
+++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c
@@ -50,6 +50,7 @@
#define BM_NO_BACKING_STORE 0x2000
#define BM_NO_FENCE_SUBDATA 0x4000
+#define FILE_DEBUG_FLAG DEBUG_BUFMGR
static int check_fenced( struct intel_context *intel );
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index 7a6293b5578..ce0d4402b4c 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -31,6 +31,7 @@
#include "intel_decode.h"
#include "bufmgr.h"
+#define FILE_DEBUG_FLAG DEBUG_BATCH
static void intel_batchbuffer_reset( struct intel_batchbuffer *batch )
{
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 31fe20fb2ad..374022e64af 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -43,8 +43,7 @@
#include "bufmgr.h"
-
-
+#define FILE_DEBUG_FLAG DEBUG_BLIT
/*
* Copy the back buffer to the front buffer.
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 49431b2a0b2..b825078761b 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -239,6 +239,9 @@ static const struct dri_debug_control debug_control[] =
{ "wm", DEBUG_WM },
{ "vs", DEBUG_VS },
{ "bat", DEBUG_BATCH },
+ { "blit", DEBUG_BLIT},
+ { "mip", DEBUG_MIPTREE},
+ { "reg", DEBUG_REGION},
{ NULL, 0 }
};
@@ -644,7 +647,10 @@ static void intelContendedLock( struct intel_context *intel, GLuint flags )
/* Lost context?
*/
if (sarea->ctxOwner != me) {
- DBG("Lost Context: sarea->ctxOwner %x me %x\n", sarea->ctxOwner, me);
+ if (INTEL_DEBUG & DEBUG_BUFMGR) {
+ fprintf(stderr, "Lost Context: sarea->ctxOwner %x me %x\n",
+ sarea->ctxOwner, me);
+ }
sarea->ctxOwner = me;
intel->vtbl.lost_hardware( intel );
}
@@ -653,7 +659,10 @@ static void intelContendedLock( struct intel_context *intel, GLuint flags )
* between contexts which all share a local buffer manager.
*/
if (sarea->texAge != my_bufmgr) {
- DBG("Lost Textures: sarea->texAge %x my_bufmgr %x\n", sarea->ctxOwner, my_bufmgr);
+ if (INTEL_DEBUG & DEBUG_BUFMGR) {
+ fprintf(stderr, "Lost Textures: sarea->texAge %x my_bufmgr %x\n",
+ sarea->ctxOwner, my_bufmgr);
+ }
sarea->texAge = my_bufmgr;
bm_fake_NotifyContendedLockTake( intel );
}
diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h
index 5848d0c1ba0..fa35f3fbe57 100644
--- a/src/mesa/drivers/dri/i965/intel_context.h
+++ b/src/mesa/drivers/dri/i965/intel_context.h
@@ -353,6 +353,15 @@ extern int INTEL_DEBUG;
#define DEBUG_URB 0x20000
#define DEBUG_VS 0x40000
#define DEBUG_BATCH 0x80000
+#define DEBUG_BUFMGR 0x100000
+#define DEBUG_BLIT 0x200000
+#define DEBUG_REGION 0x400000
+#define DEBUG_MIPTREE 0x800000
+
+#define DBG(...) do { \
+ if (INTEL_DEBUG & FILE_DEBUG_FLAG) \
+ _mesa_printf(__VA_ARGS__); \
+} while(0)
/* ================================================================
* intel_context.c:
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 268a982a97f..09c85101888 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -32,6 +32,8 @@
#include "enums.h"
#include "imports.h"
+#define FILE_DEBUG_FLAG DEBUG_MIPTREE
+
static GLenum target_to_target( GLenum target )
{
switch (target) {
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
index 3bdf2fb4790..dc2e266a3d7 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
@@ -40,6 +40,7 @@
#include "intel_blit.h"
#include "intel_regions.h"
+#define FILE_DEBUG_FLAG DEBUG_PIXEL
static struct intel_region *
copypix_src_region(struct intel_context *intel, GLenum type)
diff --git a/src/mesa/drivers/dri/i965/intel_regions.c b/src/mesa/drivers/dri/i965/intel_regions.c
index b78eba898ff..9c92ab47775 100644
--- a/src/mesa/drivers/dri/i965/intel_regions.c
+++ b/src/mesa/drivers/dri/i965/intel_regions.c
@@ -45,6 +45,8 @@
#include "bufmgr.h"
#include "imports.h"
+#define FILE_DEBUG_FLAG DEBUG_REGION
+
/* XXX: Thread safety?
*/
GLubyte *intel_region_map(struct intel_context *intel, struct intel_region *region)