xf86-video-intel: src/i965_render.c
Carl Worth
cworth at kemper.freedesktop.org
Wed Oct 1 16:07:08 PDT 2008
src/i965_render.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
New commits:
commit ab2b70f831314f81a581bfb1e48d059a3a2b0b06
Author: Carl Worth <cworth at cworth.org>
Date: Wed Oct 1 16:05:16 2008 -0700
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.
diff --git a/src/i965_render.c b/src/i965_render.c
index 498fa1f..2b59e91 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 {
More information about the xorg-commit
mailing list