Bug 101397 - [EGL] Surfaceless lacks swrast support
Summary: [EGL] Surfaceless lacks swrast support
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: 17.0
Hardware: All All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-12 23:10 UTC by Ian
Modified: 2019-09-18 18:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.