[Mesa-dev] [Bug 35945] GLX contexts are not resized properly when using XCBOwnsEventQueue

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 3 04:09:53 PST 2012


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

Uli Schlachter <psychon at znc.in> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45213|0                           |1
        is obsolete|                            |

--- Comment #1 from Uli Schlachter <psychon at znc.in> 2012-01-03 04:09:53 PST ---
Created attachment 55077
  --> https://bugs.freedesktop.org/attachment.cgi?id=55077
Samuel Rødal's code extended so that it prints events that are received
(compile with -lX11 -lX11-xcb -lGL -lxcb)

I added a little printf to see what events are received (and piped the output
through sort -u to make it less annoying).

The USE_XCB-version sees an event with type 75 which the Xlib version doesn't
see. Event 75 is DRI2's event base +1 here:

$ xdpyinfo -queryExtensions | grep DRI2
    DRI2  (opcode: 137, base event: 74)

According to xcb's dri2.h, this is a DRI2_InvalidateBuffers event:

$ grep ' 1' projects/libxcb/src/dri2.h | tail -n1
#define XCB_DRI2_INVALIDATE_BUFFERS 1

So the question is: What happens to that event when using Xlib?
Mesa's src/glx/dri2.c, function DRI2WireToEvent() knows the answer. Mesa does
some internal processing for the event (function dri2InvalidateBuffers()) and
then returns "False" which means Xlib can't process the event and thus doesn't
return it to the application.

So the problem is that in the USE_XCB version dri2InvalidateBuffers() isn't
called.
To fix this, a new function has to be added to mesa which the application has
to call for DRI2_InvalidateBuffers events (with XCB there is no way for mesa to
hook into the event processing and get a callback from xcb). Or does anyone see
an alternative solution?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list