xserver/hw/kdrive/ati radeon_composite.c,1.18,1.19
Eric Anholt
xserver-commit at pdx.freedesktop.org
Sun Feb 20 19:05:57 PST 2005
- Previous message: xserver/hw/xgl xglcmap.c, 1.3, 1.4 xglcomp.c, 1.3, 1.4 xglglyph.c,
1.1, 1.2 xglpixmap.c, 1.7, 1.8 xglwindow.c, 1.3, 1.4
- Next message: xserver/hw/kdrive/ati ati.h, 1.15, 1.16 ati_draw.c, 1.32,
1.33 ati_draw.h, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/ati
In directory gabe:/tmp/cvs-serv9414
Modified Files:
radeon_composite.c
Log Message:
Extend the filter support to R200, and do the check for filter settings in
Check rather than Prepare, to avoid migration of things we won't be able to
accelerate.
Index: radeon_composite.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/radeon_composite.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- radeon_composite.c 8 Feb 2005 22:43:53 -0000 1.18
+++ radeon_composite.c 21 Feb 2005 03:05:55 -0000 1.19
@@ -156,6 +156,10 @@
if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0))
ATI_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h));
+ if (pPict->filter != PictFilterNearest &&
+ pPict->filter != PictFilterBilinear)
+ ATI_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter));
+
return TRUE;
}
@@ -206,8 +210,7 @@
RADEON_MIN_FILTER_LINEAR);
break;
default:
- ATI_FALLBACK (("Bad filter 0x%x\n", pPict->filter));
- break;
+ ATI_FALLBACK(("Bad filter 0x%x\n", pPict->filter));
}
BEGIN_DMA(7);
@@ -403,6 +406,10 @@
if (pPict->repeat && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0))
ATI_FALLBACK(("NPOT repeat unsupported (%dx%d)\n", w, h));
+ if (pPict->filter != PictFilterNearest &&
+ pPict->filter != PictFilterBilinear)
+ ATI_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter));
+
return TRUE;
}
@@ -411,7 +418,7 @@
{
ATIScreenInfo *atis = accel_atis;
KdScreenPriv(pPix->drawable.pScreen);
- CARD32 txformat, txoffset, txpitch;
+ CARD32 txfilter, txformat, txoffset, txpitch;
int w = pPict->pDrawable->width;
int h = pPict->pDrawable->height;
int i;
@@ -442,10 +449,23 @@
if ((txpitch & 0x1f) != 0)
ATI_FALLBACK(("Bad texture pitch 0x%x\n", txpitch));
+ switch (pPict->filter) {
+ case PictFilterNearest:
+ txfilter = (R200_MAG_FILTER_NEAREST |
+ R200_MIN_FILTER_NEAREST);
+ break;
+ case PictFilterBilinear:
+ txfilter = (R200_MAG_FILTER_LINEAR |
+ R200_MIN_FILTER_LINEAR);
+ break;
+ default:
+ ATI_FALLBACK(("Bad filter 0x%x\n", pPict->filter));
+ }
+
if (unit == 0) {
BEGIN_DMA(6);
OUT_RING(DMA_PACKET0(R200_REG_PP_TXFILTER_0 + 0x20 * unit, 5));
- OUT_RING_REG(R200_REG_PP_TXFILTER_0, 0);
+ OUT_RING_REG(R200_REG_PP_TXFILTER_0, txfilter);
OUT_RING_REG(R200_REG_PP_TXFORMAT_0, txformat);
OUT_RING_REG(R200_REG_PP_TXFORMAT_X_0, 0);
OUT_RING_REG(R200_REG_PP_TXSIZE_0,
@@ -456,7 +476,7 @@
} else {
BEGIN_DMA(6);
OUT_RING(DMA_PACKET0(R200_REG_PP_TXFILTER_1, 5));
- OUT_RING_REG(R200_REG_PP_TXFILTER_1, 0);
+ OUT_RING_REG(R200_REG_PP_TXFILTER_1, txfilter);
OUT_RING_REG(R200_REG_PP_TXFORMAT_1, txformat);
OUT_RING_REG(R200_REG_PP_TXFORMAT_X_1, 0);
OUT_RING_REG(R200_REG_PP_TXSIZE_1,
- Previous message: xserver/hw/xgl xglcmap.c, 1.3, 1.4 xglcomp.c, 1.3, 1.4 xglglyph.c,
1.1, 1.2 xglpixmap.c, 1.7, 1.8 xglwindow.c, 1.3, 1.4
- Next message: xserver/hw/kdrive/ati ati.h, 1.15, 1.16 ati_draw.c, 1.32,
1.33 ati_draw.h, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xserver-commit
mailing list