summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-11-02 19:55:07 -0700
committerEric Anholt <eric@anholt.net>2010-11-03 06:08:27 -0700
commitbb1540835056cdea5db6f55b19c0c87358f14cd1 (patch)
tree0706831df699c89f82558d983651fdf4489dfe6c /src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
parentb19b8580602a6ba37e81dc8b64c4ed30c1518886 (diff)
intel: Annotate debug printout checks with unlikely().
This provides the optimizer with hints about code hotness, which we're quite certain about for debug printouts (or, rather, while we developers often hit the checks for debug printouts, we don't care about performance while doing so).
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_pixel_bitmap.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 63fb4b37b1..e7356a6da0 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -113,9 +113,8 @@ static GLuint get_bitmap_rect(GLsizei width, GLsizei height,
GLint incr;
GLuint count = 0;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s %d,%d %dx%d bitmap %dx%d skip %d src_offset %d mask %d\n",
- __FUNCTION__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
+ DBG("%s %d,%d %dx%d bitmap %dx%d skip %d src_offset %d mask %d\n",
+ __FUNCTION__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
if (invert) {
first = h-1;
@@ -285,7 +284,7 @@ do_blit_bitmap( struct gl_context *ctx,
}
out:
- if (INTEL_DEBUG & DEBUG_SYNC)
+ if (unlikely(INTEL_DEBUG & DEBUG_SYNC))
intel_batchbuffer_flush(intel->batch);
if (_mesa_is_bufferobj(unpack->BufferObj)) {
@@ -299,6 +298,7 @@ out:
return GL_TRUE;
}
+
/* There are a large number of possible ways to implement bitmap on
* this hardware, most of them have some sort of drawback. Here are a
* few that spring to mind: