diff options
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_context.h')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 46d10d74ba3..9d5139c0000 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -98,6 +98,16 @@ extern void intelFallback(struct intel_context *intel, GLbitfield bit, #define INTEL_MAX_FIXUP 64 +#ifndef likely +#ifdef __GNUC__ +#define likely(expr) (__builtin_expect(expr, 1)) +#define unlikely(expr) (__builtin_expect(expr, 0)) +#else +#define likely(expr) (expr) +#define unlikely(expr) (expr) +#endif +#endif + struct intel_sync_object { struct gl_sync_object Base; @@ -180,9 +190,6 @@ struct intel_context } prim; GLuint stats_wm; - GLboolean locked; - char *prevLockFile; - int prevLockLine; /* Offsets of fields within the current vertex: */ @@ -359,10 +366,15 @@ extern int INTEL_DEBUG; #define DEBUG_CLIP 0x8000000 #define DBG(...) do { \ - if (INTEL_DEBUG & FILE_DEBUG_FLAG) \ + if (unlikely(INTEL_DEBUG & FILE_DEBUG_FLAG)) \ printf(__VA_ARGS__); \ } while(0) +#define fallback_debug(...) do { \ + if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS)) \ + printf(__VA_ARGS__); \ +} while(0) + #define PCI_CHIP_845_G 0x2562 #define PCI_CHIP_I830_M 0x3577 #define PCI_CHIP_I855_GM 0x3582 |