summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-07-31 22:40:42 +0800
committerXiang, Haihao <[email protected]>2007-07-31 22:40:42 +0800
commite66757c8babe6968ea2e506d1214c8063cbd0760 (patch)
tree5184608658f9862b8bcaf55d692d9ad8626856b3 /src/mesa/drivers
parent69337ed098bdf0def6820ccdb121b08c0e139085 (diff)
i965: fix bad casts in do_blit_bitmap to support WindowPos correctly
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_bitmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
index 421fcc5e511..f3f062e6517 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -226,10 +226,10 @@ do_blit_bitmap( GLcontext *ctx,
dsty = dPriv->y + (dPriv->h - dsty - height);
dstx = dPriv->x + dstx;
- dest_rect.x1 = dstx;
- dest_rect.y1 = dsty;
- dest_rect.x2 = dstx + width;
- dest_rect.y2 = dsty + height;
+ dest_rect.x1 = dstx < 0 ? 0 : dstx;
+ dest_rect.y1 = dsty < 0 ? 0 : dsty;
+ dest_rect.x2 = dstx + width < 0 ? 0 : dstx + width;
+ dest_rect.y2 = dsty + height < 0 ? 0 : dsty + height;
for (i = 0; i < nbox; i++) {
drm_clip_rect_t rect;