Bug 34042 - Surfaceless eglMakeCurrent() fails if the supplied EGLContext is not a dummy context
Summary: Surfaceless eglMakeCurrent() fails if the supplied EGLContext is not a dummy ...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 08:28 UTC by Alexandros Frantzis
Modified: 2011-02-11 13:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Example exhibiting the issue (2.47 KB, text/x-csrc)
2011-02-08 08:28 UTC, Alexandros Frantzis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandros Frantzis 2011-02-08 08:28:51 UTC
Created attachment 43116 [details]
Example exhibiting the issue

In a EGL implementation that supports EGL_KHR_surfaceless_opengl, making an EGLContext current without any surfaces works only if the supplied EGLContext is a "dummy" one (see the example).

Running the example on my system (r600g but EGL_SOFTWARE=1 results are the same) I get:

$ MESA_DEBUG=1 ./egl-surfaceless 
EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_surfaceless_gles1 EGL_KHR_surfaceless_gles2 EGL_KHR_surfaceless_opengl 
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable
eglMakeCurrent Dummy Succeeded: 0x3000
Mesa warning: MakeCurrent: incompatible visuals for context and drawbuffer
eglMakeCurrent Normal Failed: 0x3000

It is strange that although the second eglMakeCurrent fails, the eglError() returns EGL_SUCCESS (0x3000).
Comment 1 Benjamin Franzke 2011-02-08 10:05:18 UTC
Should be fixed by: http://lists.freedesktop.org/archives/mesa-dev/2011-February/005371.html
Comment 2 Alexandros Frantzis 2011-02-08 11:50:46 UTC
(In reply to comment #1)
> Should be fixed by:
> http://lists.freedesktop.org/archives/mesa-dev/2011-February/005371.html

I tried the patch, but the problem remains.
Comment 3 Alexandros Frantzis 2011-02-08 12:27:23 UTC
Note that I have this problem with all of r600g, r600c, i915c and gallium softpipe.
Comment 4 Benjamin Franzke 2011-02-08 13:16:27 UTC
(In reply to comment #3)
> Note that I have this problem with all of r600g, r600c, i915c and gallium
> softpipe.

I can't reproduce this using your test client (or cairo-egl).
Tested with r600g and softpipe using egl_gallium and egl_dri2.

You might want to use EGL_LOG_LEVEL=debug to get more output.
Comment 5 Alexandros Frantzis 2011-02-08 15:42:29 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Note that I have this problem with all of r600g, r600c, i915c and gallium
> > softpipe.
> 
> I can't reproduce this using your test client (or cairo-egl).
> Tested with r600g and softpipe using egl_gallium and egl_dri2.
> 
> You might want to use EGL_LOG_LEVEL=debug to get more output.

The proposed patch works after all. I was forgetting to set EGL_DRIVERS_PATH when testing the libraries built from git. Sorry for the false alarm.

Thanks!
Comment 6 Benjamin Franzke 2011-02-11 13:56:48 UTC
The patch is commited now, closing.


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.