[PATCH 27/29] dri2: add initial prime support. (v1.2)
Dave Airlie
airlied at gmail.com
Thu Sep 6 14:40:34 PDT 2012
On Thu, Sep 6, 2012 at 10:21 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Thu, 06 Sep 2012 13:17:50 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>> On Thu, 5 Jul 2012 21:30:34 +0100, Dave Airlie <airlied at gmail.com> wrote:
>> > +static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
>> > + DRI2BufferPtr pDest, DRI2BufferPtr pSrc)
>> > +{
>> > + DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
>> > + DRI2ScreenPtr ds;
>> > + ScreenPtr primeScreen;
>> > +
>> > + primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
>> > + ds = DRI2GetScreen(primeScreen);
>> > +
>> > + if (ds->CopyRegion2)
>> > + (*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc);
>> > + else
>> > + (*ds->CopyRegion) (pDraw, pRegion, pDest, pSrc);
>> > +
>> > + /* cause damage to the box */
>> > + if (pPriv->prime_id) {
>> > + BoxRec box;
>> > + RegionRec region;
>> > + box.x1 = 0;
>> > + box.x2 = box.x1 + pDraw->width;
>> > + box.y1 = 0;
>> > + box.y2 = box.y1 + pDraw->height;
>> > + RegionInit(®ion, &box, 1);
>> > + RegionTranslate(®ion, pDraw->x, pDraw->y);
>>
>> Double translation here and this bug has been copied into the other
>> drivers as well.
>
> Weirder is that gnome-shell depends on this translation, xcompmgr is
> buggy with.
> -Chris
Wierd I test with both of those and generally don't see a problem,
though I did wonder abuot this translate, but I turned on damage
debugging and it showed it was necessary.
The drivers could do the damage, the problem here is the wrong driver
wuold be diong it.
This is causing damage on the intel pixmap after the nvidia has done a
back->front copy. So I didn't see any reason for the driver to do it
snice it has to be the same code for all drivers, it makes no sense
for it to be per-driver.
Dave.
More information about the xorg-devel
mailing list