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

mesa: add surfaceless egl platform #66542

Merged
merged 1 commit into from Aug 13, 2019

Conversation

matthewbauer
Copy link
Member

This is needed on headless systems without a DISPLAY. Mesa will build it by default if you use "auto", so it makes sense to build it here.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@Ericson2314
Copy link
Member

Ericson2314 commented Aug 12, 2019

I would love to use this from 19.03, but what do other things about backporting a change like this? I think the key question is whether mesa always prefers x11 to surfaceless.

@matthewbauer
Copy link
Member Author

I would love to use this from 19.03, but what do other things about backporting a change like this? I think the key question is whether mesa always prefers x11 to surfaceless.

Mesa takes the first one from the egl-platforms list when it can't detect the display:

https://github.com/mesa3d/mesa/blob/65ae86b85422ae0d41624dd56f935d85b0164a13/src/egl/main/egldisplay.c#L148-L181

surfaceless probably /should/ be first in that list so that we gracefully fall back on headless systems. But mesa itself uses "x11,wayland,drm,surfaceless" as the default order, so we should probably stick with that for now.

@matthewbauer matthewbauer changed the base branch from master to staging August 13, 2019 15:39
@matthewbauer matthewbauer merged commit bab946b into NixOS:staging Aug 13, 2019
@Ericson2314
Copy link
Member

Actually it's good that surfaceless is last. Surfaceless is the least featureful---no display---and this means we can safely backport because x11 and others will always be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants