diff options
author | Benjamin Herrenschmidt <benh at kernel dot crashing dot org> | 2006-02-13 05:30:13 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh at kernel dot crashing dot org> | 2006-02-13 05:30:13 +0000 |
commit | 622d3ef2ddce944af674a28ae6ed932bd1b45856 (patch) | |
tree | 7124f02365cb8d4cdfe0eff530064b5af32751e5 | |
parent | 82b4245f296fee80cc65c9b839e49b264f896135 (diff) |
Fix EXA acceleration of textures with byteswap or tiling From John Clemens
<john@deater.net>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/radeon_exa_render.c | 20 |
2 files changed, 16 insertions, 10 deletions
@@ -1,3 +1,9 @@ +2006-02-13 Benjamin Herrenschmidt <benh@kernel.crashing.org> + + * src/radeon_exa_render.c: (R100TextureSetup), (R200TextureSetup): + Fix EXA acceleration of textures with byteswap or tiling + From John Clemens <john@deater.net> + 2006-02-06 Eric Anholt <anholt@FreeBSD.org> * src/radeon_exa_render.c: diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index c4c4b25..8206600 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -223,6 +223,11 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txpitch = exaGetPixmapPitch(pPix); txoffset = exaGetPixmapOffset(pPix) + info->fbLocation; + if ((txoffset & 0x1f) != 0) + RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset)); + if ((txpitch & 0x1f) != 0) + RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); + for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { if (R100TexFormats[i].fmt == pPict->format) @@ -241,11 +246,6 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txformat |= RADEON_TXFORMAT_NON_POWER2; txformat |= unit << 24; /* RADEON_TXFORMAT_ST_ROUTE_STQX */ - if ((txoffset & 0x1f) != 0) - RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset)); - if ((txpitch & 0x1f) != 0) - RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); - switch (pPict->filter) { case PictFilterNearest: txfilter = (RADEON_MAG_FILTER_NEAREST | RADEON_MIN_FILTER_NEAREST); @@ -466,6 +466,11 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txpitch = exaGetPixmapPitch(pPix); txoffset = exaGetPixmapOffset(pPix) + info->fbLocation; + if ((txoffset & 0x1f) != 0) + RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset)); + if ((txpitch & 0x1f) != 0) + RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); + for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) { if (R200TexFormats[i].fmt == pPict->format) @@ -484,11 +489,6 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txformat |= R200_TXFORMAT_NON_POWER2; txformat |= unit << R200_TXFORMAT_ST_ROUTE_SHIFT; - if ((txoffset & 0x1f) != 0) - RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset)); - if ((txpitch & 0x1f) != 0) - RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); - switch (pPict->filter) { case PictFilterNearest: txfilter = (R200_MAG_FILTER_NEAREST | |