diff options
author | Carl Worth <cworth@cworth.org> | 2008-10-01 16:05:16 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2008-10-01 16:05:16 -0700 |
commit | ab2b70f831314f81a581bfb1e48d059a3a2b0b06 (patch) | |
tree | f15585efc5da9860161cabd2294b59dd5804811f /src/i965_render.c | |
parent | 128223ee9b7880e640056475462eca9a88415492 (diff) |
Prefer repeatType field over using both repeat and repeatType.
Eric informed me that the repeat field exists only for backwards
compatibility with old drivers that weren't prepared for values
other than 0 or 1 here. Since we are, we can just ignore that
field and examine only repeatType. So the code's a (tiny) bit
simpler this way.
Diffstat (limited to 'src/i965_render.c')
-rw-r--r-- | src/i965_render.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 498fa1f8..2b59e91d 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -209,7 +209,7 @@ static Bool i965_check_composite_texture(PicturePtr pPict, int unit) I830FALLBACK("Unsupported picture format 0x%x\n", (int)pPict->format); - if (pPict->repeat && pPict->repeatType > RepeatReflect) + if (pPict->repeatType > RepeatReflect) I830FALLBACK("extended repeat (%d) not supported\n", pPict->repeatType); @@ -840,11 +840,8 @@ sampler_state_filter_from_picture (int filter) } static sampler_state_extend_t -sampler_state_extend_from_picture (int repeat, int repeat_type) +sampler_state_extend_from_picture (int repeat_type) { - if (repeat == 0) - return SAMPLER_STATE_EXTEND_NONE; - switch (repeat_type) { case RepeatNone: return SAMPLER_STATE_EXTEND_NONE; @@ -1029,8 +1026,7 @@ 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, - pSrcPicture->repeatType); + src_extend = sampler_state_extend_from_picture (pSrcPicture->repeatType); if (src_extend < 0) I830FALLBACK ("Bad src repeat 0x%x\n", pSrcPicture->repeatType); @@ -1038,8 +1034,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, 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, - pMaskPicture->repeatType); + mask_extend = sampler_state_extend_from_picture (pMaskPicture->repeatType); if (mask_extend < 0) I830FALLBACK ("Bad mask repeat 0x%x\n", pMaskPicture->repeatType); } else { |