Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eglInitialize Fails on Headless llvmpipe System #1551

Closed
cwfitzgerald opened this issue Jun 24, 2021 · 6 comments · Fixed by #1599
Closed

eglInitialize Fails on Headless llvmpipe System #1551

cwfitzgerald opened this issue Jun 24, 2021 · 6 comments · Fixed by #1599
Labels
area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. type: bug Something isn't working type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

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.

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request area: infrastructure Testing, building, coordinating issues labels Jun 24, 2021
@Gordon-F
Copy link
Contributor

We also can use OpenGL ES backend with lavapipe.

@kvark
Copy link
Member

kvark commented Jun 24, 2021

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?

bors bot added a commit that referenced this issue Jul 4, 2021
1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald

**Connections**

No longer fixes #1551.

**Description**

This PR has a couple things going on at once.

- Fixes limits for llvmpipe, lavapipe, and rpi4.
- Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL.
- Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits.
- Moved all examples to the new downlevel limits
- Reworks CI to re-enable software testing and unify instructions.

**Testing**

It is

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
bors bot added a commit that referenced this issue Jul 4, 2021
1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald

**Connections**

No longer fixes #1551.

**Description**

This PR has a couple things going on at once.

- Fixes limits for llvmpipe, lavapipe, and rpi4.
- Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL.
- Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits.
- Moved all examples to the new downlevel limits
- Reworks CI to re-enable software testing and unify instructions.

**Testing**

It is

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
@bors bors bot closed this as completed in 118cf2c Jul 4, 2021
@cwfitzgerald cwfitzgerald reopened this Jul 4, 2021
bors bot added a commit that referenced this issue Jul 29, 2021
1739: Run Reftests on WARP r=kvark a=cwfitzgerald

**Connections**

#1551.

**Description**

All the segmentation faults on linux, none of them on windows.

**Testing**

It is!


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
@cwfitzgerald
Copy link
Member Author

cwfitzgerald commented Sep 15, 2021

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.

@cwfitzgerald cwfitzgerald added the help required We need community help to make this happen. label Sep 15, 2021
@cwfitzgerald cwfitzgerald pinned this issue Sep 15, 2021
@cwfitzgerald
Copy link
Member Author

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.

@cwfitzgerald cwfitzgerald changed the title Figure Out Testing on CI on Linux eglInitialize Fails on Headless llvmpipe System Sep 17, 2021
@cwfitzgerald cwfitzgerald added the type: bug Something isn't working label Sep 17, 2021
@dsseng
Copy link
Contributor

dsseng commented Dec 30, 2021

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!

dsseng added a commit to dsseng/wgpu that referenced this issue Dec 31, 2021
Falling back to egl::DEFAULT_DISPLAY usually results in X11 EGL platform being picked and then rejected because of unavailability on a head/GPU-less system. EGL_PLATFORM_SURFACELESS_MESA works with both radeonsi and llvmpipe/swrast when Xorg/Wayland sockets are being hidden from application. Needs to be tested in a truly GPU-less environment such as CI it is required to run in. Addresses gfx-rs#1551

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
cwfitzgerald added a commit that referenced this issue Feb 19, 2022
* Use EGL surfaceless platform when windowing system is not found

Falling back to egl::DEFAULT_DISPLAY usually results in X11 EGL platform being picked and then rejected because of unavailability on a head/GPU-less system. EGL_PLATFORM_SURFACELESS_MESA works with both radeonsi and llvmpipe/swrast when Xorg/Wayland sockets are being hidden from application. Needs to be tested in a truly GPU-less environment such as CI it is required to run in. Addresses #1551

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Set backend for capture by environment variables

Useful for testing surfaceless

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Check for EGL_MESA_platform_surfaceless extension before using surfaceless platform

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Format

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Unify types for GLES config tiers

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Remove red.png

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>

* Enable GL backend for CI

* Bump outliers count for skybox_etc2 due to llvmpipe test (102)

* Add SURFACE_TYPE PBUFFER_BIT requirement to off-screen surface tier

* Re-nix GL Backend on CI

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
@cwfitzgerald
Copy link
Member Author

Closed by #2339

@cwfitzgerald cwfitzgerald unpinned this issue Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues help required We need community help to make this happen. type: bug Something isn't working type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants