Bug 72062 - build broken for x11 egl apps
Summary: build broken for x11 egl apps
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: git
Hardware: Other All
: medium critical
Assignee: Tapani Pälli
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-27 08:35 UTC by Tapani Pälli
Modified: 2013-12-09 11:13 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (444 bytes, patch)
2013-11-27 08:50 UTC, Samuel Thibault
Details | Splinter Review
patch to fix the issue (2.12 KB, text/plain)
2013-11-27 08:57 UTC, Tapani Pälli
Details
patch to fix the issue (2.15 KB, patch)
2013-11-27 09:19 UTC, Tapani Pälli
Details | Splinter Review

Description Tapani Pälli 2013-11-27 08:35:48 UTC
Cannot run opengles2.0 apps anymore on X11 backend, such as es2gears in Mesa demos.

bisected to:
------------
commit a594cec7e3ef275c386054127a357110a19dd823
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Nov 10 19:32:01 2013 +0100

    EGL: fix build without libdrm
    
    This fixes building EGL without libdrm support.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Comment 1 Tapani Pälli 2013-11-27 08:37:51 UTC
More specifically, building mesa like this:

./autogen.sh --enable-gles2 --with-egl-platforms=x11

does not result in having a working egl and gles2 implementation. Reverting a594cec7e3ef275c386054127a357110a19dd823 fixes the situation.
Comment 2 Samuel Thibault 2013-11-27 08:50:43 UTC
Created attachment 89891 [details] [review]
fix

Could you try the attached patch?

I wasn't completely sure whether dri2_authenticate was supposed to fail or not when drm is not compiled in. By looking more, since this is the client side, and dri2_authenticated is store in the structure, it seems returning true is the right way.
Comment 3 Tapani Pälli 2013-11-27 08:57:59 UTC
Created attachment 89892 [details]
patch to fix the issue

This patch adds additional HAVE_LIBDRM for x11_platform to compile correctly.
Comment 4 Tapani Pälli 2013-11-27 08:59:25 UTC
(In reply to comment #2)
> Created attachment 89891 [details] [review] [review]
> fix
> 
> Could you try the attached patch?
> 
> I wasn't completely sure whether dri2_authenticate was supposed to fail or
> not when drm is not compiled in. By looking more, since this is the client
> side, and dri2_authenticated is store in the structure, it seems returning
> true is the right way.

This does not do the trick, I want to use platform_x11 with libdrm but not having HAVE_DRM_PLATFORM since that is for gbm backend. I've attached a patch that fixes this issue for me.
Comment 5 Samuel Thibault 2013-11-27 09:07:18 UTC
Ok, but I guess both patches are needed actually, because otherwise a completely-non-drm build would have a similar issue?
Comment 6 Tapani Pälli 2013-11-27 09:13:30 UTC
(In reply to comment #5)
> Ok, but I guess both patches are needed actually, because otherwise a
> completely-non-drm build would have a similar issue?

Yep, probably so. What is the type of build you are doing (non-drm and ...) so I could test that also? I'll need to fix my patch, it seems it actually does not work correctly yet.
Comment 7 Tapani Pälli 2013-11-27 09:19:37 UTC
Created attachment 89893 [details] [review]
patch to fix the issue
Comment 8 Samuel Thibault 2013-11-27 09:24:17 UTC
The type of build I'm doing is with no drm at all, i.e. the drm headers are not installed at all (which is what was making the build fail previously).
Comment 9 Tapani Pälli 2013-11-27 09:27:08 UTC
(In reply to comment #8)
> The type of build I'm doing is with no drm at all, i.e. the drm headers are
> not installed at all (which is what was making the build fail previously).

ok, could you test with these 2 patches if you are able to run apps successfully with that build?
Comment 10 Tapani Pälli 2013-11-28 06:27:44 UTC
CC Chad to review
Comment 11 Tapani Pälli 2013-12-09 11:13:01 UTC
this was fixed by a057b837ddd1c725a7504eedc53c6df05a012773


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.