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: allow overriding driver compilation #23451

Merged
merged 1 commit into from Mar 4, 2017
Merged

Conversation

ttuegel
Copy link
Member

@ttuegel ttuegel commented Mar 3, 2017

Motivation

Mesa has encumbered features which are disabled by default. This is fine, because users need only enable them for the mesa_drivers package, which does not cause a mass-rebuild. But, the mesa_drivers package builds all the drivers Mesa provides; users building custom drivers probably only care about the drivers for their machine. This patch allows the user to build selected drivers by overriding the driDrivers, galliumDrivers, and vulkanDrivers attributes.

Testing

I have been using this patch on my own for about a month on two different machines. By carefully tweaking the default driver sets, I have avoided a mass-rebuild of packages dependent on the Mesa library.

Future work may include disabling the driver build from the library, since it is presumably not needed. (Actually, the svga and swrast drivers are not optional, but even leaving those two drivers in the library build would speed it up significantly.)

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@ttuegel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @vcunat, @wkennington and @urkud to be potential reviewers.

@vcunat
Copy link
Member

vcunat commented Mar 3, 2017

Mass rebuilds? If you care for drivers, it should be enough to only override mesa_drivers and nothing depends on that.

@vcunat
Copy link
Member

vcunat commented Mar 3, 2017

Ah, I guess you meant that this PR doesn't cause any rebuild by itself (which is true).

@ttuegel ttuegel merged commit ff8f2b8 into NixOS:master Mar 4, 2017
@ttuegel ttuegel deleted the mesa-drivers branch March 4, 2017 21:05
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

3 participants