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
vulkan-loader: 1.0.26.0 -> 1.0.39.1 #22284
Conversation
@Ralith, thanks for your PR! By analyzing the history of the files in this pull request, we identified @corngood, @expipiplus1 and @lummax to be potential reviewers. |
In the hopes of drastically simplifying future updates, I'm attempting to upstream our patches at KhronosGroup/Vulkan-LoaderAndValidationLayers#1426 and KhronosGroup/glslang#706. |
I've been working on graphics (including Vulkan) support lately. Do we really need those patches? I'm not sure if there are any benefits from using
EDIT: This is about |
@abbradar How would that work for other vulkan drivers? Also using xdg paths allows layers (and drivers, theoretically) to be installed in the user's nix profile. |
@corngood What do you mean by "other"? If you talk about non-Nix we can add more paths but right now I think it'll still search in Adding drivers in the user's profile would be difficult to implement for multilib (we have |
@abbradar Other drivers such as amdgpu-pro, nvidia, and hopefully more in the future. For multilib, I believe AMD just provides manifests for both and one or the other will fail. Where would your proposed patch for the loader actually live? |
@corngood This patch covers all drivers which are installed to I meant that in Nix drivers are usually not packaged in multilib fashion, but rather separately for 32-bit and 64-bit. They are then separately installed to The "patch" is actually those four lines ( EDIT: To clarify: I was wrong about multilib so my only point is that all the complexity of the patch may be unjustified -- redefining one macro via |
After yet more thought, even if the patch gets accepted upstream we'd still need to redefine |
@corngood Thanks for the link! I think that we can leave the patch as is but instead of prepending things to |
@abbradar If we keep the patch, I don't see what we gain by rolling back I still think it would be reasonable to just put the manifests in @Ralith ? |
@corngood We gain simplicity -- we don't need to set environment variables and things just work. This is important for example for FHS chrootenvs but generally I think we want to keep away from global environment variables as much as possible -- hardcoded values are better in cases of well-known paths. Manifests in |
@abbradar With the patch we maintain the ability to locate ICDs in As for the |
@corngood Yep, I believe now that patch is still useful -- what I propose is to use It should still be portable because EDIT: To clarify -- |
Using I agree that the size and scope of this patch is a maintenance problem, which is why I'm working to upstream it, at which point NixOS (and other non-FHS distros too) will need neither a patch nor any sketchy compile flags. I believe there's a clear case to be made that the new behavior is strictly more portable and correct than the old, so I think it has good odds of being merged before the next time we need to update this package. As far as hardcoded values vs. environment variables agree, that's a bit of a philosophical question which departs from the immediate practical benefits this patch confers. The XDG basedir spec exists and is widely used, and programs are simpler and more portable in both source and binary form than they once were as a result. Without it, we wouldn't be able to install nontrivial programs in user profiles without immense amounts of patching. |
Whoops, looks like discussion moved on while I was writing that. NixOS will always need This is getting increasingly offtopic (this PR does not change any behavior!), but note also that vulkan-loader searches |
@Ralith Thanks for spending your time to write an elaborate response! First, I agree that following XDG spec is a Good Thing and should be followed as close as possible. I also agree that Still, I think that hardcoding You are completely right that I've started an offtopic discussion and I'm sorry about that. Let's stop discussing it here; I'm going to make a PR which adds |
Tested with Mesa drivers; works fine for me. |
The vulkan-loader patch has been merged upstream; future updates to this package will no longer need it. |
That's great. Thanks for taking care of it. |
Motivation for this change
Bugfixes! cc @corngood
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)