diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-10-05 11:35:57 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-10-05 11:35:57 +0000 |
commit | 68da677ae29c0c38ca1bce1ce78087b9c7cf0e1a (patch) | |
tree | f33ecf4a73064473b54c325bd7828998864caf16 /src/mesa/drivers/dri/i965/intel_pixel_copy.c | |
parent | 1eca12a7d9f26ab5b68c5ba665c81c8aadec34fb (diff) |
Accelerate glBitmap with a color expand blit. Nice speedup for demos
like 'fire' that display a help message or fps number this way.
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_pixel_copy.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_pixel_copy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c b/src/mesa/drivers/dri/i965/intel_pixel_copy.c index ad27867aea..d5d4899452 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c @@ -74,7 +74,7 @@ copypix_src_region(struct intel_context *intel, GLenum type) * Check if any fragment operations are in effect which might effect * glDraw/CopyPixels. */ -static GLboolean +GLboolean intel_check_blit_fragment_ops(GLcontext * ctx) { if (ctx->NewState) @@ -83,6 +83,7 @@ intel_check_blit_fragment_ops(GLcontext * ctx) /* Could do logicop with the blitter: */ return !(ctx->_ImageTransferState || + ctx->RenderMode != GL_RENDER || ctx->Color.AlphaEnabled || ctx->Depth.Test || ctx->Fog.Enabled || @@ -90,8 +91,8 @@ intel_check_blit_fragment_ops(GLcontext * ctx) !ctx->Color.ColorMask[0] || !ctx->Color.ColorMask[1] || !ctx->Color.ColorMask[2] || - !ctx->Color.ColorMask[3] || - ctx->Color.ColorLogicOpEnabled || + !ctx->Color.ColorMask[3] || /* can do this! */ + ctx->Color.ColorLogicOpEnabled || /* can do this! */ ctx->Texture._EnabledUnits || ctx->FragmentProgram._Enabled); } @@ -150,7 +151,7 @@ do_blit_copypixels(GLcontext * ctx, GLint dx = dstx - srcx; GLint dy = dsty - srcy; - if (!_mesa_clip_to_region(x, y, x+w, y+h, &dstx, &dsty, &width, &height)) + if (!_mesa_clip_to_region(x, y, x+w-1, y+h-1, &dstx, &dsty, &width, &height)) goto out; srcx = dstx - dx; |