[Glamor] [PATCH 07/15] glamor-fbo-pool: Enable to reuse different size fbo/texture.
Zhigang Gong
zhigang.gong at linux.intel.com
Fri Feb 10 01:28:08 PST 2012
> -----Original Message-----
> From:
> glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.org
> [mailto:glamor-bounces+zhigang.gong=linux.intel.com at lists.freedesktop.o
> rg] On Behalf Of Chris Wilson
> Sent: Sunday, February 05, 2012 6:11 AM
> To: zhigang.gong at linux.intel.com; glamor at lists.freedesktop.org
> Cc: Zhigang Gong; zhigang.gong at gmail.com
> Subject: Re: [Glamor] [PATCH 07/15] glamor-fbo-pool: Enable to reuse
> different size fbo/texture.
>
> 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;
Thanks for pointing this out. I'm thinking about to modify the fragment
shader
to support sampling on partial texture with repeat mode.
>
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor
More information about the Glamor
mailing list