diff options
author | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-07-10 18:07:38 +0200 |
---|---|---|
committer | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-07-10 18:07:38 +0200 |
commit | d348a48ac353d7c646a0c4f976f23a764990e779 (patch) | |
tree | 4a09043093d241a74fb613ce7c82e9b72a5e8ab1 /src/mesa/drivers/dri/i915tex/intel_blit.c | |
parent | 5657fc5b4c6581166430f1a5144f1f8b7e4e78eb (diff) |
First attempt at using private back/z buffers.
Allocate and use private back and z/stencil buffers.
This is still very broken.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_blit.c')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_blit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_blit.c b/src/mesa/drivers/dri/i915tex/intel_blit.c index dbe4ba2ac5..5dcb0ddebb 100644 --- a/src/mesa/drivers/dri/i915tex/intel_blit.c +++ b/src/mesa/drivers/dri/i915tex/intel_blit.c @@ -88,6 +88,7 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv, const int nbox = dPriv->numClipRects; const drm_clip_rect_t *pbox = dPriv->pClipRects; const int pitch = frontRegion->pitch; + const int srcpitch = backRegion->pitch; const int cpp = frontRegion->cpp; int BR13, CMD; int i; @@ -96,9 +97,12 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv, ASSERT(intel_fb->Base.Name == 0); /* Not a user-created FBO */ ASSERT(frontRegion); ASSERT(backRegion); - ASSERT(frontRegion->pitch == backRegion->pitch); +// ASSERT(frontRegion->pitch == backRegion->pitch); ASSERT(frontRegion->cpp == backRegion->cpp); + DBG("copy buffer, front pitch %d back pitch %d\n", + frontRegion->pitch, backRegion->pitch); + if (cpp == 2) { BR13 = (pitch * cpp) | (0xCC << 16) | (1 << 24); CMD = XY_SRC_COPY_BLT_CMD; @@ -142,7 +146,7 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv, OUT_RELOC(frontRegion->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_WRITE, DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, 0); OUT_BATCH((pbox->y1 << 16) | pbox->x1); - OUT_BATCH(BR13 & 0xffff); + OUT_BATCH((srcpitch * cpp) & 0xffff); OUT_RELOC(backRegion->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ, DRM_BO_MASK_MEM | DRM_BO_FLAG_READ, 0); |