[Glamor] [PATCH 07/15] glamor-fbo-pool: Enable to reuse different size fbo/texture.
Chris Wilson
chris at chris-wilson.co.uk
Sat Feb 4 14:11:20 PST 2012
On Fri, 20 Jan 2012 16:52:05 +0800, zhigang.gong at linux.intel.com wrote:
> From: Zhigang Gong <zhigang.gong at linux.intel.com>
>
> Fixup too special case, one is in tile and the other is in
> composite. Both cases are due to repeat texture issue. Maybe
> we can refine the shader to recalculate texture coords to
> support partial texture's repeating.
>
> Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
> ---
> static void
> +glamor_composite_texture_fixup(ScreenPtr screen,
> + PicturePtr picture,
> + glamor_pixmap_private * pixmap_priv)
> +{
> + glamor_screen_private *glamor_priv =
> + glamor_get_screen_private(screen);
> + glamor_gl_dispatch *dispatch = &glamor_priv->dispatch;
> + Bool has_repeat;
> + int width, height;
> +
> + if (picture->repeatType == RepeatNone)
> + has_repeat = FALSE;
> + else
> + has_repeat = TRUE;
You need to take into account the possibility of a rotation matrix, and
a variety of other types which cause sampling from outside the texture within
the composite region, here as well. I.e.
if (picture->repeatType == RepeatNone)
has_repeat = picture->transform && !pixman_transform_is_int_translate(picture->transform);
else
has_repeat = TRUE;
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Glamor
mailing list