xf86-video-intel: src/i830_exa.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Mon Aug 6 16:05:34 PDT 2007
src/i830_exa.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
New commits:
diff-tree 5ff05dffe229e35da7619762628fdd0f125585e8 (from ba90d944329dd8c79a757c38128964fbbe4ab898)
Author: Jesse Barnes <jesse.barnes at intel.com>
Date: Mon Aug 6 16:01:10 2007 -0700
More tiled rendering fixes: - check for tiling, not just offset in PrepareSolid - combine pI830->tiling and frontbuffer checks into new exaPixmapTiled function for readability
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 88853a7..0e9cd5b 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -98,9 +98,14 @@ const int I830PatternROP[16] =
};
static Bool
-exaPixmapInFrontbuffer(PixmapPtr p)
+exaPixmapTiled(PixmapPtr p)
{
ScreenPtr pScreen = p->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
+
+ if (!pI830->tiling)
+ return FALSE;
if (p == pScreen->GetScreenPixmap(pScreen))
return TRUE;
@@ -147,7 +152,7 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, i
I830FALLBACK("pixmap offset not aligned");
if ( pitch % pI830->EXADriverPtr->pixmapPitchAlign != 0)
I830FALLBACK("pixmap pitch not aligned");
- if ( pI830->tiling && offset > 4096)
+ if ( exaPixmapTiled(pPixmap) && offset > 4096)
I830FALLBACK("offset limited to 4k for tiled targets");
pI830->BR[13] = (pitch & 0xffff);
@@ -186,7 +191,7 @@ I830EXASolid(PixmapPtr pPixmap, int x1,
if (pPixmap->drawable.bitsPerPixel == 32)
cmd |= XY_COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB;
- if (pI830->tiling && exaPixmapInFrontbuffer(pPixmap)) {
+ if (exaPixmapTiled(pPixmap)) {
/* Fixup pitch for destination if tiled */
pI830->BR[13] = (ROUND_TO(pI830->BR[13] & 0xffff, 512) >> 2) |
(pI830->BR[13] & 0xffff0000);
@@ -230,12 +235,11 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap,
pI830->copy_src_pitch = exaGetPixmapPitch(pSrcPixmap);
pI830->copy_src_off = exaGetPixmapOffset(pSrcPixmap);
- pI830->copy_src_tiled = (pI830->tiling &&
- exaPixmapInFrontbuffer(pSrcPixmap));
+ pI830->copy_src_tiled = exaPixmapTiled(pSrcPixmap);
if (pI830->copy_src_tiled && pI830->copy_src_off > 4096)
I830FALLBACK("offset limited to 4k for tiled targets");
- if (pI830->tiling && exaPixmapInFrontbuffer(pDstPixmap) &&
+ if (exaPixmapTiled(pDstPixmap) &&
exaGetPixmapOffset(pDstPixmap) > 4096)
I830FALLBACK("offset limited to 4k for tiled targets");
@@ -278,7 +282,7 @@ I830EXACopy(PixmapPtr pDstPixmap, int sr
if (pDstPixmap->drawable.bitsPerPixel == 32)
cmd |= XY_SRC_COPY_BLT_WRITE_ALPHA | XY_SRC_COPY_BLT_WRITE_RGB;
- if (pI830->tiling && exaPixmapInFrontbuffer(pDstPixmap)) {
+ if (exaPixmapTiled(pDstPixmap)) {
/* Fixup pitch for destination if tiled */
pI830->BR[13] = (ROUND_TO(pI830->BR[13] & 0xffff, 512) >> 2) |
(pI830->BR[13] & 0xffff0000);
More information about the xorg-commit
mailing list