summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-13 05:30:13 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-13 05:30:13 +0000
commitd4ec0223029d8fe03a836a5a6e9a7cc8897b4c90 (patch)
treea5d639af525e3a87e7004624cc8f74a205874a86
parent79c60ebbc34aaf0ac0b0723898d5b63015547178 (diff)
Fix EXA acceleration of textures with byteswap or tiling From John Clemens
<john@deater.net>
-rw-r--r--ChangeLog6
-rw-r--r--src/radeon_exa_render.c20
2 files changed, 16 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 16f613f..4586683 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 |