This is specific to EGL+gles and does not affect GLX. This is also specific to Linux too (only place tested). eglCreateImage is used as part of compositing (texture from pixmap) in X11. This started in more recent releases in the past few months (it used to work 6-12+ months ago). I’ve tried both eglCreateImage and eglCreateImageKHR (gotten from eglGetProcAddress). EGL supports pixmaps: EGL_KHR_image_pixmap is there in extension strings. This happens with 100% reproducability. This ONLY Affects NVIDIA drivers. Mesa works fine (Intel, Radeon, Nouveau, VC4 drivers on ARM). Also works fine with Mali closed drivers on ARM too.
Every time eglCreateImage is called with a valid and correct EGLDisplay handle (the exact same handle is used for eglSwapBuffer, eglQuerySurface etc. and works fine both before and after eglCreateImage). It is not terminated in between. I have tried with EGL_NO_CONTEXT and the actual context handle. EGL_NATIVE_PIXMAP_KHR is used and attributes is NULL. I’ve tried providing attributes. I’m unable to figure out EXACTLY why it thinks the display is bad. Every other egl API call thinks the display is good.
Relevant bit of code:
surface = eglCreateImage(egl_disp, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (void *)pixmap, NULL);
The surface returned is NULL. eglGetError() reports 0x3008 (EGL_BAD_DISPLAY) after this create image. the egl_disp as I mentioned I’ve printed the value and it’s constant across swap buffers, query surfaces etc. and works fine there without error. The context is actually bound to the thread at the time too. Everything else renders and swaps and so on correctly.
I cannot find a way of getting more debug on why it thinks it’s a bad display, due to it being closed source, so I’m here asking for help or information on how to debug and find out. I suspect it’s a change inside the drivers that altered it from working to not working. Maybe it has nothing to do with the display handle at all? The pixmap is valid…
How can I get more debug info out of libEGL for this?
FYI The relevant libraries and window manager/compositor is:
Relevant download ( git master: https://www.enlightenment.org/download ) scroll down about 1/2 way.
nvidia-bug-report.log.gz (239 KB)