Bug 69437 - Composite Bypass no longer works
Composite Bypass no longer works
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: EGL/Wayland
unspecified
Other All
: medium critical
Assigned To: Wayland bug list
mesa-dev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-16 20:40 UTC by U. Artie Eoff
Modified: 2013-10-25 14:57 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Best fix so far (1.43 KB, patch)
2013-09-16 21:39 UTC, Kristian Høgsberg
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description U. Artie Eoff 2013-09-16 20:40:40 UTC
Weston's composite bypass optimization for fullscreen surfaces no longer works with Mesa master or Mesa 9.2 branches.

The following 2 commits break this:

http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c2e64eda
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f423eba46e080b975a2b8366b490d99dee4729ad

(10:50:43 AM) krh: argh, the broken composite-redirect is because of these two mesa commits: 2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9 and f423eba46e080b975a2b8366b490d99dee4729ad
(10:51:34 AM) krh: we now link to a static libwayland-drm.a at compile time for libEGL and libgbm, so they get different symbols for drm_buffer_interface
Comment 1 Kristian Høgsberg 2013-09-16 21:39:33 UTC
Created attachment 85941 [details] [review]
Best fix so far

Here's the best fix so far.  Not entirely happy with it, but it's not terrible.
Comment 2 Kristian Høgsberg 2013-10-11 22:21:25 UTC
Happy I waited to push this, I came up with a much better fix:

commit 360a141f24a9d00891665b7fedb77ffb116944ca
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Sep 26 12:25:11 2013 -0700

    wayland: Don't rely on static variable for identifying wl_drm buffers
    
    Now that libEGL has been fixed to not leak all kinds of symbols, gbm
    links to its own copy of the libwayland-drm.a helper library.  That means
    we can't rely on comparing the addresses of a static vtable symbol in that
    library to determine if a wl_buffer is a wl_drm_buffer.  Instead, we
    move the vtable into the wl_drm struct and use that for comparing.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=69437
    
    Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Comment 3 U. Artie Eoff 2013-10-14 20:59:22 UTC
Thanks, I confirmed it fixes the issue on master... waiting on 9.2 backport.
Comment 4 U. Artie Eoff 2013-10-24 13:31:47 UTC
Any progress on getting this backported to the 9.2 branch?
Comment 5 Carl Worth 2013-10-24 17:13:54 UTC
(In reply to comment #4)
> Any progress on getting this backported to the 9.2 branch?

I attempted a cherry-pick over to the 9.2 branch, and there were non-trivial conflicts taht I didn't feel comfortable attempting to resolve.

I believe I pinged Kristian, asking if he could backport the patch.

Kristian?

-Carl
Comment 6 Kristian Høgsberg 2013-10-24 19:54:50 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Any progress on getting this backported to the 9.2 branch?
> 
> I attempted a cherry-pick over to the 9.2 branch, and there were non-trivial
> conflicts taht I didn't feel comfortable attempting to resolve.
> 
> I believe I pinged Kristian, asking if he could backport the patch.
> 
> Kristian?

Yup, wasn't an trivialy backport so it took a little longer and we missed the recent release.  I'll get a fix ready for the next one.
Comment 7 Kristian Høgsberg 2013-10-24 21:02:37 UTC
Just pushed the backported fix to 9.2:

commit 7ab2b8c4c4607817c91946dcba943b29f1bd1895
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Sep 26 12:25:11 2013 -0700

    wayland: Don't rely on static variable for identifying wl_drm buffers
    
    Now that libEGL has been fixed to not leak all kinds of symbols, gbm
    links to its own copy of the libwayland-drm.a helper library.  That means
    we can't rely on comparing the addresses of a static vtable symbol in that
    library to determine if a wl_buffer is a wl_drm_buffer.  Instead, we
    move the vtable into the wl_drm struct and use that for comparing.
    
    Backported from 360a141f24a9d00891665b7fedb77ffb116944ca.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=69437
    
    Cc: 9.2 <mesa-stable@lists.freedesktop.org>
Comment 8 U. Artie Eoff 2013-10-25 14:57:10 UTC
Verified fixed on both master and 9.2 branches... Thanks!