summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/intel_blit.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2007-07-11 14:20:39 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2007-07-11 14:20:39 +0200
commit43e24ff50773575d28763d899a4f25bb430418b5 (patch)
treea2b082dc9302d2d39589100c9134b3b4cb73e1d9 /src/mesa/drivers/dri/i915tex/intel_blit.c
parent1278514ff48b262ee0a4f2ac698c6df648b326a0 (diff)
some fixes, fake frontbuffer
still doesn't work quite right (resize). Fake frontbuffer doesn't copy in real frontbuffer. Don't even think about doing rotation/page flip/triple buffering for now... More cleanups needed (fake cliprects etc.)
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_blit.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_blit.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_blit.c b/src/mesa/drivers/dri/i915tex/intel_blit.c
index b4fc1691e6..d6651f62be 100644
--- a/src/mesa/drivers/dri/i915tex/intel_blit.c
+++ b/src/mesa/drivers/dri/i915tex/intel_blit.c
@@ -82,9 +82,11 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
if (dPriv && dPriv->numClipRects) {
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
const struct intel_region *frontRegion
- = intel_get_rb_region(&intel_fb->Base, BUFFER_FRONT_LEFT);
+ = intelScreen->front_region;
const struct intel_region *backRegion
- = intel_get_rb_region(&intel_fb->Base, BUFFER_BACK_LEFT);
+ = intel->ctx.DrawBuffer->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT ?
+ intel_get_rb_region(&intel_fb->Base, BUFFER_FRONT_LEFT) :
+ intel_get_rb_region(&intel_fb->Base, BUFFER_BACK_LEFT);
const int nbox = dPriv->numClipRects;
const drm_clip_rect_t *pbox = dPriv->pClipRects;
const int pitch = frontRegion->pitch;
@@ -100,7 +102,7 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
// ASSERT(frontRegion->pitch == backRegion->pitch);
ASSERT(frontRegion->cpp == backRegion->cpp);
- DBG("copy buffer, front pitch %d back pitch %d\n",
+ DBG("front pitch %d back pitch %d\n",
frontRegion->pitch, backRegion->pitch);
if (cpp == 2) {
@@ -138,6 +140,11 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
continue;
}
+ DBG("box x1 x2 y1 y2 %d %d %d %d\n",
+ box.x1, box.x2, box.y1, box.y2);
+
+ /* XXX should make sure only the minimum area based on
+ old draw buffer and new front clip rects is copied */
sbox.x1 = box.x1 - dPriv->x;
sbox.y1 = box.y1 - dPriv->y;
@@ -417,9 +424,8 @@ intelClearWithBlit(GLcontext * ctx, GLbitfield mask)
b = *box;
}
- if (0)
- _mesa_printf("clear %d,%d..%d,%d, mask %x\n",
- b.x1, b.y1, b.x2, b.y2, mask);
+ DBG("clear %d,%d..%d,%d, mask %x\n",
+ b.x1, b.y1, b.x2, b.y2, mask);
/* Loop over all renderbuffers */
for (buf = 0; buf < BUFFER_COUNT && clearMask; buf++) {