#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,
#include "macros.h"
#include "mtypes.h"
-
-
-
-
-
-
static GLboolean do_check_fallback(struct brw_context *brw)
{
GLcontext *ctx = &brw->intel.ctx;
#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:
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
#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 );
#include "intel_decode.h"
#include "bufmgr.h"
+#define FILE_DEBUG_FLAG DEBUG_BATCH
static void intel_batchbuffer_reset( struct intel_batchbuffer *batch )
{
#include "bufmgr.h"
-
-
+#define FILE_DEBUG_FLAG DEBUG_BLIT
/*
* Copy the back buffer to the front buffer.
{ "wm", DEBUG_WM },
{ "vs", DEBUG_VS },
{ "bat", DEBUG_BATCH },
+ { "blit", DEBUG_BLIT},
+ { "mip", DEBUG_MIPTREE},
+ { "reg", DEBUG_REGION},
{ NULL, 0 }
};
/* 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 );
}
* 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 );
}
#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:
#include "enums.h"
#include "imports.h"
+#define FILE_DEBUG_FLAG DEBUG_MIPTREE
+
static GLenum target_to_target( GLenum target )
{
switch (target) {
#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)
#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)