diff options
author | Eric Anholt <[email protected]> | 2013-05-21 16:20:18 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-22 14:35:44 -0700 |
commit | cf37e12024911e2b4c972db9472a81e71ca2f086 (patch) | |
tree | 9c7e48ca066be4a384d6b749add45ffa504d4aab /src/mesa | |
parent | 0af614727ac04c89b94d3572692c5315664083c1 (diff) |
intel: Count fragments in our blitter-based glBitmap() path.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59440
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_pixel_bitmap.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c index 954dfc50b14..c538a29571a 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c @@ -259,14 +259,15 @@ do_blit_bitmap( struct gl_context *ctx, * Have to translate destination coordinates back into source * coordinates. */ - if (get_bitmap_rect(bitmap_width, bitmap_height, unpack, - bitmap, - -orig_dstx + (dstx + px), - -orig_dsty + y_flip(fb, dsty + py, h), - w, h, - (GLubyte *)stipple, - 8, - _mesa_is_winsys_fbo(fb)) == 0) + int count = get_bitmap_rect(bitmap_width, bitmap_height, unpack, + bitmap, + -orig_dstx + (dstx + px), + -orig_dsty + y_flip(fb, dsty + py, h), + w, h, + (GLubyte *)stipple, + 8, + _mesa_is_winsys_fbo(fb)); + if (count == 0) continue; if (!intelEmitImmediateColorExpandBlit(intel, @@ -284,6 +285,9 @@ do_blit_bitmap( struct gl_context *ctx, logic_op)) { return false; } + + if (ctx->Query.CurrentOcclusionObject) + ctx->Query.CurrentOcclusionObject->Result += count; } } out: |