diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-08-27 09:52:10 +0200 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-08-27 09:52:10 +0200 |
commit | 27d9664f8862d1948dd32021f8e9bcb94f23e4ef (patch) | |
tree | 4eecbe5bf8db1137bd2816d5c11704b788845038 /src/r600_exa.c | |
parent | 9b5517fcf7f2397a1a814d396fc9dc24769a6d9f (diff) |
EXA: RENDER repeat cleanups.
We can't rely on the server setting pPict->repeatType to something sensible
when pPict->repeat is FALSE, but we can do it ourselves.
Diffstat (limited to 'src/r600_exa.c')
-rw-r--r-- | src/r600_exa.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c index 3e775157..57867f1b 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -1258,30 +1258,29 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, tex_samp.id = unit; tex_samp.border_color = SQ_TEX_BORDER_COLOR_TRANS_BLACK; - if (pPict->repeat) { - switch (pPict->repeatType) { - case RepeatNormal: - tex_samp.clamp_x = SQ_TEX_WRAP; - tex_samp.clamp_y = SQ_TEX_WRAP; - break; - case RepeatPad: - tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; - tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; - break; - case RepeatReflect: - tex_samp.clamp_x = SQ_TEX_MIRROR; - tex_samp.clamp_y = SQ_TEX_MIRROR; - break; - case RepeatNone: - tex_samp.clamp_x = SQ_TEX_CLAMP_BORDER; - tex_samp.clamp_y = SQ_TEX_CLAMP_BORDER; - break; - default: - RADEON_FALLBACK(("Bad repeat 0x%x\n", pPict->repeatType)); - } - } else { + /* Unfortunately we can't rely on the X server doing this for us */ + if (!pPict->repeat) + pPict->repeatType = RepeatNone; + + switch (pPict->repeatType) { + case RepeatNormal: + tex_samp.clamp_x = SQ_TEX_WRAP; + tex_samp.clamp_y = SQ_TEX_WRAP; + break; + case RepeatPad: + tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; + tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; + break; + case RepeatReflect: + tex_samp.clamp_x = SQ_TEX_MIRROR; + tex_samp.clamp_y = SQ_TEX_MIRROR; + break; + case RepeatNone: tex_samp.clamp_x = SQ_TEX_CLAMP_BORDER; tex_samp.clamp_y = SQ_TEX_CLAMP_BORDER; + break; + default: + RADEON_FALLBACK(("Bad repeat 0x%x\n", pPict->repeatType)); } switch (pPict->filter) { |