Bug 96694 - Using EGL_KHR_surfaceless_context causes spurious "libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering."
Summary: Using EGL_KHR_surfaceless_context causes spurious "libEGL warning: FIXME: egl...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 11.2
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 12:51 UTC by Pekka Paalanen
Modified: 2019-09-25 18:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pekka Paalanen 2016-06-27 12:51:36 UTC
I was reviewing a patch to Weston to use EGL_KHR_surfaceless_context for making a context current while there are no outputs whose EGLSurface could be used. Weston does not use front buffer rendering.

Looks like this causes a spurious warning:
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.

The stack trace is:

#0  0x00007ffff36f7b80 in dri3_flush_front_buffer () from /usr/lib64/libEGL.so.1
#1  0x00007fffeff0be8c in intel_flush_front () from /usr/lib64/dri/i965_dri.so
#2  0x00007fffeff0bedd in intel_glFlush () from /usr/lib64/dri/i965_dri.so
#3  0x00007ffff36ef881 in dri2_make_current () from /usr/lib64/libEGL.so.1
#4  0x00007ffff36e9ceb in eglMakeCurrent () from /usr/lib64/libEGL.so.1
#5  0x00007ffff054b275 in use_output (output=<optimized out>) at /home/pq/git/weston/libweston/gl-renderer.c:670
#6  0x00007ffff054c035 in gl_renderer_repaint_output (output=0x807320, output_damage=0x7fffffffd380)
    at /home/pq/git/weston/libweston/gl-renderer.c:1096
#7  0x00007ffff57866d9 in x11_output_repaint_gl (output_base=0x807320, damage=0x7fffffffd380)
    at /home/pq/git/weston/libweston/compositor-x11.c:380
#8  0x00007ffff7bc1e34 in weston_output_repaint (output=0x807320) at /home/pq/git/weston/libweston/compositor.c:2266
#9  output_repaint_timer_handler (data=0x807320) at /home/pq/git/weston/libweston/compositor.c:2305
#10 0x00007ffff79a7e29 in wl_event_source_timer_dispatch (source=0x7faab0, ep=<optimized out>) at src/event-loop.c:182
#11 0x00007ffff79a8432 in wl_event_loop_dispatch (loop=0x611200, timeout=timeout@entry=-1) at src/event-loop.c:422
#12 0x00007ffff79a6c05 in wl_display_run (display=display@entry=0x611170) at src/wayland-server.c:1051
#13 0x0000000000405426 in main (argc=1, argv=<optimized out>) at /home/pq/git/weston/compositor/main.c:1737

Weston sets up the gl-renderer with a EGL_NO_SURFACE made current, and later when repainting the real X11 window for the first time I believe, the warning triggers once. In the backtrace I see that the warning happens when eglMakeCurrent is called with the real EGLSurface. I suspect Mesa tries to flush the old context first, and somehow having EGL_NO_SURFACE bound causes it to think it is doing front buffer rendering, while it was in fact doing no-buffer-rendering.

If I force Weston to use the fallback path by creating a pbuffer instead of using EGL_NO_SURFACE, the warning does not appear.

The warning was added to Mesa in commit f35198badeb956a8f435727d805a47c7e42610d0. I am using Mesa 11.2.2 as packaged in Gentoo.

Because in the backtrace it looks like the decision to flush the front is made inside the intel driver, I picked that as the component.
Comment 1 Pekka Paalanen 2016-06-27 13:10:49 UTC
I have just pushed the patch triggering the warning to Weston master branch:

commit 28d240f2819fdace6d70bff055ff75425a426783
Author: Armin Krezović <krezovic.armin@gmail.com>
Date:   Thu Jun 23 11:59:35 2016 +0200

    gl-renderer: Always setup gl-renderer


The warning does not trigger on the EGL GBM platform, naturally.
Comment 2 jidanni 2019-06-08 01:54:48 UTC
Still seen in https://github.com/anbox/anbox/issues/861
ii  libegl1                         1.1.0-1
Comment 3 Tapani Pälli 2019-06-11 08:08:00 UTC
FYI this happens on X11 with EGL pbuffer tests as well, for example with:

dEQP-EGL.functional.color_clears.single_context.gles2.rgba8888_pbuffer

output:

--- 8< ---
Test case 'dEQP-EGL.functional.color_clears.single_context.gles2.rgba8888_pbuffer'..
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering.
  Pass (Pass)
Comment 4 GitLab Migration User 2019-09-25 18:56:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1525.


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.