diff options
author | Alex Deucher <alex@samba.(none)> | 2008-02-26 14:33:24 -0500 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2008-02-26 14:33:24 -0500 |
commit | 44e527a117ab0a363135ff066c7f7e0c12e3dc89 (patch) | |
tree | 47f1d45f7ae8cf7a2c1ca3762683dc8d7f0f0e31 /src/radeon_exa_render.c | |
parent | 00ec17ad53d7ad43f19c9b723794ac1b8ef86826 (diff) |
R300: fix cordinate clamping in render code
Based on Peter's fix for textured video
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r-- | src/radeon_exa_render.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 30e3329e..9bbccb5c 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -809,8 +809,8 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txformat1 = R300TexFormats[i].card_fmt; - txformat0 = (((RADEONPow2(w) - 1) << R300_TXWIDTH_SHIFT) | - ((RADEONPow2(h) - 1) << R300_TXHEIGHT_SHIFT)); + txformat0 = (((w - 1) << R300_TXWIDTH_SHIFT) | + ((h - 1) << R300_TXHEIGHT_SHIFT)); if (pPict->repeat) { ErrorF("repeat\n"); @@ -822,15 +822,18 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix, txformat0 |= R300_TXPITCH_EN; - info->texW[unit] = RADEONPow2(w); - info->texH[unit] = RADEONPow2(h); + info->texW[unit] = w; + info->texH[unit] = h; + + txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | + R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST)); switch (pPict->filter) { case PictFilterNearest: - txfilter = (R300_TX_MAG_FILTER_NEAREST | R300_TX_MIN_FILTER_NEAREST); + txfilter |= (R300_TX_MAG_FILTER_NEAREST | R300_TX_MIN_FILTER_NEAREST); break; case PictFilterBilinear: - txfilter = (R300_TX_MAG_FILTER_LINEAR | R300_TX_MIN_FILTER_LINEAR); + txfilter |= (R300_TX_MAG_FILTER_LINEAR | R300_TX_MIN_FILTER_LINEAR); break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); |