summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-07-12 21:52:02 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-07-12 21:52:02 +0200
commit8b6517abfc20dc508c2a4cb1f6f22f34a8a70805 (patch)
treef45b11f5e0c06f25a5a49bc8b98ed736085805b4 /src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c
parent9870f7bccc55f9b1728fa8b9ed78a72ab15d7f4f (diff)
don't use driDrawable information directly, don't resize at makecurrent
driDrawable information now isn't used in most parts of the driver. makecurrent only updates fb information when the context is new (driDrawable is still updated by the dri common code).
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c
index 65bf338589..96d3cbef5f 100644
--- a/src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i915tex/intel_pixel_bitmap.c
@@ -195,18 +195,18 @@ do_blit_bitmap( GLcontext *ctx,
LOCK_HARDWARE(intel);
- if (intel->driDrawable->numClipRects) {
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
- drm_clip_rect_t *box = dPriv->pClipRects;
+ if (intel->numClipRects) {
+ assert(intel->numClipRects == 1);
+ drm_clip_rect_t *box = intel->pClipRects;
drm_clip_rect_t dest_rect;
- GLint nbox = dPriv->numClipRects;
+ GLint nbox = intel->numClipRects;
GLint srcx = 0, srcy = 0;
GLint orig_screen_x1, orig_screen_y2;
GLuint i;
- orig_screen_x1 = dPriv->x + dstx;
- orig_screen_y2 = dPriv->y + (dPriv->h - dsty);
+ orig_screen_x1 = dstx;
+ orig_screen_y2 = box->y2 - dsty;
/* Do scissoring in GL coordinates:
*/
@@ -223,8 +223,8 @@ x if (ctx->Scissor.Enabled)
/* Convert from GL to hardware coordinates:
*/
- dsty = dPriv->y + (dPriv->h - dsty - height);
- dstx = dPriv->x + dstx;
+ dsty = box->y2 - dsty - height;
+ dstx = dstx;
dest_rect.x1 = dstx;
dest_rect.y1 = dsty;
@@ -235,7 +235,7 @@ x if (ctx->Scissor.Enabled)
drm_clip_rect_t rect;
int box_w, box_h;
GLint px, py;
- GLuint stipple[32];
+ GLuint stipple[32];
if (!intel_intersect_cliprects(&rect, &dest_rect, &box[i]))
continue;