[PATCH] radeon: fix exa texture setup v2
Michel Dänzer
michel at daenzer.net
Tue Nov 13 01:30:17 PST 2012
On Mon, 2012-11-12 at 16:11 -0500, j.glisse at gmail.com wrote:
> From: Jerome Glisse <jglisse at redhat.com>
>
> exa state that we should use the pixmap to get the width, height and
> pitch to use when setting up texture (see exa.h). This fix a rare case
> where picture->pDrawable->(width|height) > pixmap->drawable.(width|height)
>
> v2: keep special case for solid
>
> Signed-off-by: Jerome Glisse <jglisse at redhat.com>
> ---
> src/evergreen_exa.c | 4 ++--
> src/r600_exa.c | 4 ++--
> src/radeon_exa_render.c | 12 ++++++------
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
> index 883fa5c..10c53d0 100644
> --- a/src/evergreen_exa.c
> +++ b/src/evergreen_exa.c
> @@ -844,8 +844,8 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
>
> /* Texture */
> if (pPict->pDrawable) {
> - tex_res.w = pPict->pDrawable->width;
> - tex_res.h = pPict->pDrawable->height;
> + tex_res.w = pPix->drawable.width;
> + tex_res.h = pPix->drawable.height;
I doubt this is quite right yet...
E.g. if pPict->pDrawable is a window which is smaller than the backing
pixmap (which I'd expect to be a common case for window pictures), this
should still use pPict->pDrawable->width/height? (But that probably
still isn't enough if the window origin doesn't lie at the pixmap
origin...)
OTOH if the pixmap is smaller than the window, I don't think this change
will do the right thing for RepeatNormal or RepeatReflect.
Not sure rendercheck tests such corner cases at all yet.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-driver-ati
mailing list