Bug 101397

Summary: [EGL] Surfaceless lacks swrast support
Product: Mesa Reporter: Ian <inio>
Component: EGLAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: 17.0   
Hardware: All   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=83984
Whiteboard:
i915 platform: i915 features:

Description Ian 2017-06-12 23:10:46 UTC
I'm trying to set up unit tests for another project that Use OpenGL ES and do not rely on having an X11 display (because they run headless) or hardware acceleration (because they run on VMs usually).

Mesa surfaceless EGL looked like a perfect solution, but it seems the EGL surfaceless platform lacks support for selecting the swrast driver.  I see explicit support in the drm, wayland, and x11 platforms files for it, but nothing in android or surfaceless.

Running on 17.0.7 (corp OS has too old of a libdrm for 17.1.2) but confirmed that this doesn't appear to have changed in 17.1.2.

Configured with:

./configure --enable-gallium --prefix=$HOME/mesa/install --with-llvm-prefix=/usr/lib/llvm-3.4/ --enable-debug --with-gallium-drivers=swrast --with-dri-drivers=swrast --with-egl-platforms=surfaceless

(have to specify llvm path as auto-search finds a local version that's bogus)

Ran as (with DISPLAY unset):

LD_LIBRARY_PATH=$HOME/mesa/install/lib LIBGL_DRIVERS_PATH=$HOME/mesa/install/lib/dri LIBGL_DEBUG=verbose MESA_DEBUG=verbose EGL_LOG_LEVEL=debug ~/a.out

Output:

libEGL debug: Native platform type: surfaceless (build-time configuration)
libEGL debug: added egl_dri2 to module array
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in DRI2: failed to load driver
libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize
Comment 1 Carlos Alberto Lopez Perez 2017-09-30 04:46:34 UTC
Related: https://patchwork.freedesktop.org/patch/179981/
Comment 2 Eric Engestrom 2017-10-04 16:50:35 UTC
Initial support has landed yesterday, but might need further work and testing:

commit 9d9a46d4efc00b256d2c0d04dda6c4ee3f0dc47a
Author: Gurchetan Singh <gurchetansingh@chromium.org>
Date:   Mon Oct 2 13:48:24 2017 -0700

    egl/surfaceless: Use KMS swrast fallback

Please run your unit tests, and CC me on any bug you raise :)
Comment 3 GitLab Migration User 2019-09-18 18:07:26 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/159.

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.