[Bug 90836] Ksnapshot (KDE) broken when using xf86-video-intel-2.99.916 + DRI3

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 5 08:54:51 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90836

Chris Wilson <chris at chris-wilson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Chris Wilson <chris at chris-wilson.co.uk> ---
Ok, there is an interesting quirk in ksnapshot:

000:<:0732: 40: Request(1): CreateWindow depth=0x00 window=0x02e00145
parent=0x000000a4 x=-10000 y=-10000 width=683 height=307 border-width=0
class=CopyFromParent(0x0000) visual=CopyFromParent(0x00000000)
value-list={background-pixel=0x00ffffff border-pixel=0x00000000}
...
000:<:075c:  8: Request(8): MapWindow window=0x02e00145
000:>:075d: Event MapNotify(19) event=0x02e00145 window=0x02e00145
override-redirect=true(0x01)
000:>:075d: Event Expose(12) window=0x02e00145 x=0 y=0 width=683 height=307
count=0x0000
...
000:<:0765: 16: Request(53): CreatePixmap depth=0x18 pid=0x02e00148
drawable=0x0
00000a4 width=1366 height=768
000:<:0766: 20: RENDER-Request(138,4): CreatePicture pid=0x02e00149
drawable=0x0
2e00148 format=0x0000002a values={}
000:<:0767: 16: Request(55): CreateGC cid=0x02e0014a drawable=0x02e00148
values=
{}
000:<:0768: 16: Request(56): ChangeGC gc=0x02e0014a
values={subwindow-mode=Inclu
deInferiors(0x01)}
000:<:0769: 28: Request(62): CopyArea src-drawable=0x000000a4
dst-drawable=0x02e
00148 gc=0x02e0014a src-x=0 src-y=0 dst-x=0 dst-y=0 width=1366 height=768
000:<:076a:  8: Request(60): FreeGC gc=0x02e0014a
000:<:076b:  8: Request(27): UngrabPointer time=0x0094b535
000:<:076c:  8: Request(10): UnmapWindow window=0x02e00145

So ksnapshot does actually copy the screen while it itself is mapped (and
visible). However, at the time of its screengrab, it hasn't rendered so it will
effectively be transparent.

So the problem is that image does somehow contain rendering from the future.

Hmm, 

[  9745.803] sna_pixmap_make_cow: moo! attaching clone to pixmap=6954
(source=966, handle=221)

pixmap=6954 is, if you haven't guess it, ksnapshot's screengrab. So we are
deferring the copy here - but since the source is actually a foriegn DRI3
buffer, kwin renders into it unbeknownst to us.

commit ada30742ec115a44445e24c1775583b2684d94a4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 5 16:44:18 2015 +0100

    sna: Add COW source pixmap to flushing list

    In the case of an exported pixmap, e.g. with DRI3, it is possible for
    the client to render into the pixmap whilst we are unaware. To serialise
    the xserver and the client, we flush all operations on exported pixmaps
    before talking to the client. In the case of COW however, we did not
    flush the copy-on-write when transferring control to the client, and
    thereby we could capture the modified contents.

    Bugzilla: https://bugs.kde.org/show_bug.cgi?id=340202
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90836
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150605/a3d72728/attachment-0001.html>


More information about the intel-gfx-bugs mailing list