xf86-video-ati: Branch 'master'
Dave Airlie
airlied at kemper.freedesktop.org
Fri Apr 24 00:32:35 PDT 2009
src/radeon_exa_render.c | 65 ++++++++++++++++++---------------------
src/radeon_textured_videofuncs.c | 6 +--
2 files changed, 33 insertions(+), 38 deletions(-)
New commits:
commit 5998f262a52cb85b334fcc1fe24c7b2ae474ce93
Author: Dave Airlie <airlied at linux.ie>
Date: Fri Apr 24 17:30:57 2009 +1000
radeon: attempt to fix R clamping for repeat again
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 71f9652..02bada4 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1104,41 +1104,36 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
txfilter = (unit << R300_TX_ID_SHIFT);
- if (pPict->repeat) {
- switch (pPict->repeatType) {
- case RepeatNormal:
- if (unit != 0 || !info->accel_state->need_src_tile_x)
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP);
- else
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL);
-
- if (unit != 0 || !info->accel_state->need_src_tile_y)
- txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP);
- else
- txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
-
- txfilter |= R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
- break;
- case RepeatPad:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_LAST);
- break;
- case RepeatReflect:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_MIRROR);
- break;
- case RepeatNone:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
- break;
- }
- } else
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
+ switch (pPict->repeatType) {
+ case RepeatNormal:
+ if (unit != 0 || !info->accel_state->need_src_tile_x)
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP);
+ else
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL);
+
+ if (unit != 0 || !info->accel_state->need_src_tile_y)
+ txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP);
+ else
+ txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
+
+ txfilter |= R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
+ break;
+ case RepeatPad:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
+ break;
+ case RepeatReflect:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
+ break;
+ case RepeatNone:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
+ break;
+ }
switch (pPict->filter) {
case PictFilterNearest:
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index de0eeb6..217abfb 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -1079,7 +1079,7 @@ FUNC_NAME(R300DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
R300_TX_MAG_FILTER_LINEAR |
R300_TX_MIN_FILTER_LINEAR |
(0 << R300_TX_ID_SHIFT));
@@ -1108,7 +1108,7 @@ FUNC_NAME(R300DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
txpitch -= 1;
txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
R300_TX_MIN_FILTER_LINEAR |
R300_TX_MAG_FILTER_LINEAR);
@@ -1141,7 +1141,7 @@ FUNC_NAME(R300DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
/* Tex filter */
txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP) |
R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_WRAP) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER) |
R300_TX_MIN_FILTER_NEAREST |
R300_TX_MAG_FILTER_NEAREST |
(1 << R300_TX_ID_SHIFT));
More information about the xorg-commit
mailing list