eglInitialize Fails on Headless llvmpipe System
cwfitzgerald opened this issue · 6 comments
Is your feature request related to a problem? Please describe.
With #1538 merged, we have the ability to test our graphics code in CI. Once dx12 and dx11 are implemented, we can use WARP to test these backeds on the windows build.
Describe the solution you'd like
The two main software implementation of vulkan are lavapipe and swiftshader. Both have had issues. We need to evaluate them or any other options.
Describe alternatives you've considered
Relying solely on WARP and local testing of our test suite. We may also be able to rely on our todo network of testing machines.
We also can use OpenGL ES
backend with lavapipe
.
I think Lavapipe mostly works. At least I can run everything on my machine here.
We should take a closer look at the failures on CI. Maybe grab the call stacks and report them upstream?
Here's the current status of this issue:
llvmpipe works fine locally, but when I hook it up in CI, I get a bunch of errors while trying to get the EGL context. I have no idea how to fix this. https://github.com/gfx-rs/wgpu/runs/3594599602?check_suite_focus=true
lavapipe segfaults on mesa 21.0.3 which is provided by ubuntu-x-swat/updates, but it passes all tests on a locally built 21.2.0-devel. We would need some way of upgrading our mesa enough to use the tests. Docker is an option, though a pain.
We can consider the vulkan side of this setup done, as we used https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers to get a new mesa, and all of our normal tests pass. There is #1974, but that is a different extension.
All that remains is stuborn EGL.
EGL_PLATFORM=surfaceless
helps with eglInitialize
crash.
Tested with:
EGL_PLATFORM=surfaceless WAYLAND_DISPLAY= DISPLAY= cargo run --example capture
(not really a headless system, graphic acceleration is present but all signs of compositor working are hidden).
Still searching for a proper code solution... Looks like surfaceless support will be ready to PR soon!
Closed by #2339