diff options
author | Carl Worth <cworth@cworth.org> | 2008-10-01 15:26:39 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-10-01 15:33:04 -0700 |
commit | b7279f1be1b913c1c6ee8ebfb95c97800217a821 (patch) | |
tree | 1548a487eeb94edd33c129db0926a302bfc2ff6b /src/i965_render.c | |
parent | bf8a3ffeaa4df9ecbad7abff9a44d714de2fa104 (diff) |
Examine picture repeatType as well as repeat field.
The existing switch statement was switching on the Boolean
repeat field rather than the correct repeatType field. This
had not caused any problem before as only two possible repeat
values were supported (RepeatNone = 0 and RepeatNormal = 1)
so they were always the same as the repeat field.
Soon, however, we'll be supporting more repeat types, so we'll
need to switch on the correct value.
Diffstat (limited to 'src/i965_render.c')
-rw-r--r-- | src/i965_render.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 7dee5f3f..b4a2a73c 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -828,9 +828,12 @@ sampler_state_filter_from_picture (int filter) } static sampler_state_extend_t -sampler_state_extend_from_picture (int repeat) +sampler_state_extend_from_picture (int repeat, int repeat_type) { - switch (repeat) { + if (repeat == 0) + return SAMPLER_STATE_EXTEND_NONE; + + switch (repeat_type) { case RepeatNone: return SAMPLER_STATE_EXTEND_NONE; case RepeatNormal: @@ -1010,17 +1013,19 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, src_filter = sampler_state_filter_from_picture (pSrcPicture->filter); if (src_filter < 0) I830FALLBACK ("Bad src filter 0x%x\n", pSrcPicture->filter); - src_extend = sampler_state_extend_from_picture (pSrcPicture->repeat); + src_extend = sampler_state_extend_from_picture (pSrcPicture->repeat, + pSrcPicture->repeatType); if (src_extend < 0) - I830FALLBACK ("Bad src repeat 0x%x\n", pSrcPicture->repeat); + I830FALLBACK ("Bad src repeat 0x%x\n", pSrcPicture->repeatType); if (pMaskPicture) { mask_filter = sampler_state_filter_from_picture (pMaskPicture->filter); if (mask_filter < 0) I830FALLBACK ("Bad mask filter 0x%x\n", pMaskPicture->filter); - mask_extend = sampler_state_extend_from_picture (pMaskPicture->repeat); + mask_extend = sampler_state_extend_from_picture (pMaskPicture->repeat, + pMaskPicture->repeatType); if (mask_extend < 0) - I830FALLBACK ("Bad mask repeat 0x%x\n", pMaskPicture->repeat); + I830FALLBACK ("Bad mask repeat 0x%x\n", pMaskPicture->repeatType); } else { mask_filter = SAMPLER_STATE_FILTER_NEAREST; mask_extend = SAMPLER_STATE_EXTEND_NONE; |