[PATCH] radeon: fallback to software when we get picture bigger than pixmap v2

Jerome Glisse j.glisse at gmail.com
Thu Nov 15 09:06:32 PST 2012


On Thu, Nov 15, 2012 at 10:53 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On Don, 2012-11-15 at 10:47 -0500, Jerome Glisse wrote:
>> On Thu, Nov 15, 2012 at 5:08 AM, Michel Dänzer <michel at daenzer.net> wrote:
>> > On Mit, 2012-11-14 at 16:26 -0500, j.glisse at gmail.com wrote:
>> >> From: Jerome Glisse <jglisse at redhat.com>
>> >>
>> >> This is some kind off degenerate case that we might get from time to
>> >> time, just fallback to software when facing it.
>> >>
>> >> v2: Handle the other degenerate case of NULL drawable
>> >>
>> >> Signed-off-by: Jerome Glisse <jglisse at redhat.com>
>> >> ---
>> >>  src/evergreen_exa.c     |   14 +++++++++-----
>> >>  src/r600_exa.c          |   14 +++++++++-----
>> >>  src/radeon_exa_render.c |   12 ++++++++++++
>> >>  3 files changed, 30 insertions(+), 10 deletions(-)
>> >>
>> >> diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
>> >> index 883fa5c..9f79da8 100644
>> >> --- a/src/evergreen_exa.c
>> >> +++ b/src/evergreen_exa.c
>> >> @@ -837,13 +837,12 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
>> >>      CLEAR (tex_res);
>> >>      CLEAR (tex_samp);
>> >>
>> >> -    for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) {
>> >> -     if (EVERGREENTexFormats[i].fmt == pPict->format)
>> >> -         break;
>> >> -    }
>> >> -
>> >>      /* Texture */
>> >>      if (pPict->pDrawable) {
>> >> +        if (pPict->pDrawable->width > pPix->drawable.width || pPict->pDrawable->height > pPix->drawable.height) {
>> >> +            /* just let software fallback handle this degenerate case */
>> >> +            return FALSE;
>> >> +        }
>> >
>> > As discussed in the 'fix exa texture setup v2' thread, I think this is
>> > only scratching the surface of cases we're not handling correctly for
>> > window pictures. If you don't want to more accurately test for the cases
>> > we are handling correctly, I think it might be better to always fall
>> > back for window pictures for now.
>>
>> I read back some of the X bits and pixmap always have origin at 0,0 so
>> we only need to take into account the width, height of window.
>
> Definitely not. The most obvious counter example is without a
> compositing manager, in which case all windows are stored in the screen
> pixmap.
>

I am talking about pixmap (DRAWABLE_PIXMAP) here not window. pixmap
have no origin field. Anyway will just disable window.

Cheers,
Jerome


More information about the xorg-driver-ati mailing list