Skip to content

Comments

mesa: don't specify spirv2dxil output if it's not built#371771

Closed
mvnetbiz wants to merge 1 commit intoNixOS:masterfrom
mvnetbiz:mesa-outputs
Closed

mesa: don't specify spirv2dxil output if it's not built#371771
mvnetbiz wants to merge 1 commit intoNixOS:masterfrom
mvnetbiz:mesa-outputs

Conversation

@mvnetbiz
Copy link
Contributor

@mvnetbiz mvnetbiz commented Jan 7, 2025

If mesa was overridden to specify a list of gallium drivers that didn't include d3d12, nix would fail the build for not producing the spirv2dxil output.

Things done

For example this now works, where before it failed with failed to produce output path for output 'spirv2dxil'.

nix-build  --expr '((import ./. {}).pkgs.mesa.override { galliumDrivers = [ "llvmpipe" "radeonsi" "i915" ]; vulkanDrivers = [ "swrast" ]; }).drivers'
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 7, 2025
Copy link
Contributor

@marcusramberg marcusramberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed this when updating asahi mesa to latest from Nixpkgs as well.

@mvnetbiz
Copy link
Contributor Author

mvnetbiz commented Jan 9, 2025

It used to be conditional, but was removed in #319047. It looks like the output may also be produced if microsoft-experimental" is in vulkanDrivers.

If mesa was overridden to specify a list of gallium drivers that didn't
include d3d12, nix would fail the build for not producing the spirv2dxil
output.
@mvnetbiz
Copy link
Contributor Author

mvnetbiz commented Jan 9, 2025

If you're trying to make a minimal mesa, you probably have to overrideAttrs a bunch of other stuff too, so maybe just fix it that way instead of adding this back?

let
  pkgs = import ./. { };
  inherit (pkgs) lib;
in
((pkgs.mesa.override {
  galliumDrivers = [ "llvmpipe" ];
  vulkanDrivers = [ "swrast" ];
  libvdpau = null;
}).overrideAttrs (old: {
  outputs = lib.remove "spirv2dxil" old.outputs; # relevant line
  mesonFlags = old.mesonFlags ++ [
    (lib.mesonEnable "gallium-vdpau" false)
    (lib.mesonEnable "gallium-va" false)
    (lib.mesonEnable "gallium-xa" false)
    (lib.mesonBool "gallium-nine" false)
  ];
})).drivers

@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 9, 2025
@mvnetbiz mvnetbiz closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants