diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2008-06-18 13:46:55 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2008-06-18 13:52:04 +0800 |
commit | 3ed89025f3df9e72afe0a77c847aab13b2ee861b (patch) | |
tree | addab719fc420c8b0c31b8ca49ee8b6596292790 | |
parent | 5b42bbce70ea093ee9a0e8fa7a0d42ddc4143832 (diff) | |
download | mesa-3ed89025f3df9e72afe0a77c847aab13b2ee861b.tar.gz |
i915: The pitch passed to intelEmitCopyBlitLocked should be in pixels,
not in bytes. Reported by Christopher Dissauer.
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_pixel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_pixel.c b/src/mesa/drivers/dri/i915/intel_pixel.c index 31ed5cfa25b..c5005bac792 100644 --- a/src/mesa/drivers/dri/i915/intel_pixel.c +++ b/src/mesa/drivers/dri/i915/intel_pixel.c @@ -228,7 +228,7 @@ intelTryReadPixels( GLcontext *ctx, __DRIdrawablePrivate *dPriv = intel->driDrawable; int nbox = dPriv->numClipRects; int src_offset = intel->readRegion->offset; - int src_pitch = intel->intelScreen->front.pitch; + int src_pitch = intel->intelScreen->front.pitch / intel->intelScreen->cpp; /* in pixels */ int dst_offset = intelAgpOffsetFromVirtual( intel, pixels); drm_clip_rect_t *box = dPriv->pClipRects; int i; @@ -308,7 +308,7 @@ static void do_draw_pix( GLcontext *ctx, int nbox = dPriv->numClipRects; int i; int src_offset = intelAgpOffsetFromVirtual( intel, pixels); - int src_pitch = pitch; + int src_pitch = pitch; /* in pixels */ assert(src_offset != ~0); /* should be caught earlier */ @@ -339,7 +339,7 @@ static void do_draw_pix( GLcontext *ctx, intelEmitCopyBlitLocked( intel, intel->intelScreen->cpp, src_pitch, src_offset, - intel->intelScreen->front.pitch, + intel->intelScreen->front.pitch / intel->intelScreen->cpp, /* in pixels */ intel->drawRegion->offset, bx - x, by - y, bx, by, |