Bug 98310 - GLES context returned by OpenGL API
Summary: GLES context returned by OpenGL API
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: git
Hardware: Other All
: medium major
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 15:01 UTC by Cedric Sodhi
Modified: 2016-10-18 15:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Cedric Sodhi 2016-10-18 15:01:51 UTC
The ultimate consequence of this bug is that EPoxy thinks that the current context is OpenGL, although it is GLES2. It reports this up to GTK/GDK which then abandones GLES2 rendering (because it thinks OpenGL is being used).

EPoxy tests whether the current context is OpenGL by

epoxy_egl_get_current_gl_context_api( )

in two steps, by first binding the API which is being tested for:

eglBindAPI( EGL_OPENGL_API );

and subsequently testing for a context

if( eglGetCurrentContext( ) ) ...

I don't know whether this is actually a proper way of testing this (or why this is required by further up in the first place), but I can definitely say I do NOT have OpenGL (simply because of the lack of X11 libraries and I built Mesa only with GLES2) but that call, after the OPENGL_API was bound, returns a context. Which in turn makes Epoxy think that the context is OpenGL.
Comment 1 Adam Jackson 2016-10-18 15:12:48 UTC
Mesa is right, epoxy is wrong:

https://github.com/anholt/libepoxy/pull/90
Comment 2 Chad Versace 2016-10-18 15:22:14 UTC
Related bug on the real libepoxy bugtracker: https://github.com/anholt/libepoxy/issues/25


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.