summaryrefslogtreecommitdiff
path: root/src/r600_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-08-28 12:20:04 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-08-28 12:20:04 +0200
commit39dfac41eebbcdacb1ae0c17cea325ea2966c4a5 (patch)
treecc80ab7b40b3a0430861644ad66c3256c3f4c9bd /src/r600_exa.c
parent7d36f13afa5da742aa6c989a2652e92c96e5f80e (diff)
EXA: RENDER repeat fix and more cleanup.
Apparently changing pPict->repeatType causes badness, see http://bugs.freedesktop.org/show_bug.cgi?id=23560 . Now we just use a normalized repeatType value derived from pPict->repeat and pPict->repeatType everywhere.
Diffstat (limited to 'src/r600_exa.c')
-rw-r--r--src/r600_exa.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 57867f1b..f2ddc677 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1062,6 +1062,7 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
{
int w = pPict->pDrawable->width;
int h = pPict->pDrawable->height;
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
unsigned int i;
int max_tex_w, max_tex_h;
@@ -1092,7 +1093,7 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
* clipping.
*/
/* FIXME R6xx */
- if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) {
+ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) {
if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0)))
RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
}
@@ -1108,6 +1109,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
struct radeon_accel_state *accel_state = info->accel_state;
int w = pPict->pDrawable->width;
int h = pPict->pDrawable->height;
+ unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone;
unsigned int i;
tex_resource_t tex_res;
tex_sampler_t tex_samp;
@@ -1258,11 +1260,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
tex_samp.id = unit;
tex_samp.border_color = SQ_TEX_BORDER_COLOR_TRANS_BLACK;
- /* Unfortunately we can't rely on the X server doing this for us */
- if (!pPict->repeat)
- pPict->repeatType = RepeatNone;
-
- switch (pPict->repeatType) {
+ switch (repeatType) {
case RepeatNormal:
tex_samp.clamp_x = SQ_TEX_WRAP;
tex_samp.clamp_y = SQ_TEX_WRAP;
@@ -1280,7 +1278,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
tex_samp.clamp_y = SQ_TEX_CLAMP_BORDER;
break;
default:
- RADEON_FALLBACK(("Bad repeat 0x%x\n", pPict->repeatType));
+ RADEON_FALLBACK(("Bad repeat 0x%x\n", repeatType));
}
switch (pPict->filter) {