-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
amdvlk: init at 2020.Q2.5 #82305
amdvlk: init at 2020.Q2.5 #82305
Conversation
@ashkitten: Thanks for taking a look at this, I updated the package to 2020.Q1.3 and the hash should be correct now. |
when i set |
If I also tested the code of a simple Vulkan tutorial with SDL (with Wayland support). I added these libraries to the rpath, so |
interesting that they work fine with radv anyways |
can confirm that it works now, by the way |
just tried to build this on my laptop and it says that the sha256 is invalid again. i'm not sure how repo projects work, but the hash seems to be unstable which is an issue. |
Thank you for all the testing! Possibilities to fix this are
I think 3 is the easiest way to fix this. @ashkitten, what do you think? |
that sounds reasonable. |
56c04a1
to
ff7a7e6
Compare
Many releases later, we are now at 2020.Q2.3 and the package declaration got slimmer 🎉. |
Updated to 2020.Q2.4. |
Don't have the power to merge anything I'm afraid, but I just wanted to note that I tried this just now to play with the new Path of Exile Vulkan beta (RADV crashes) and it worked wonderfully. |
Can also confirm this works for me |
Perhaps there should be a module that sets it up correctly? |
Thanks for trying it out!
Putting the packages into |
I didn't actually try that and just went straight to setting the environment variable, I was thinking of a module that would set that environment variable for you but I guess if adding it to |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Hello, Great work, this works well on my R9 390. |
I tried a few things and while it doesn’t change anything, adding
Every application decides itself which GPU/which driver it uses or it allows the user to choose. To force a certain driver, e.g. amdvlk or radv, setting
can be used. If amdvlk is in |
Working well on my system too. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting this and for sending a reminder on discourse. I have added some more suggested changes.
|
||
nativeBuildInputs = [ | ||
cmake | ||
ninja |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to compile without ninja
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review!
ninja
is picked up by CMake automatically and for a project of this size (I’m looking at you llvm), ninja should be considerably faster than make.
I fixed all the other things you noticed.
Also, tested with nixpkgs-review rev HEAD
$ export VK_ICD_FILENAMES=results/amdvlk/share/vulkan/icd.d/amd_icd64.json
$ export DISPLAY=:1
$ vkcube and it still works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Result of nixpkgs-review pr 82305
1
1 package built:
- amdvlk
Thanks for pushing this forward! I don't have an AMD GPU, but there are three confirmations that this works.
It would be nice if enabling the AMD Vulkan driver could be documented somewhere (perhaps the handbook or wiki?).
so, to enable the vulkan drivers, you just need to add amdvlk to hardware.opengl.extraPackages and then it's done ? |
You don't actually have to do anything to use Vulkan drivers ;). If you have |
I think both, RADV (the default AMD Vulkan driver which is part of mesa and installed when you set |
Motivation for this change
AMDVLK is the official open source Vulkan driver from AMD.
The
share/vulkan/icd.d/amd_icd64.json
file makes this the default driver if amdvlk is added toenvironment.systemPackages
.(To switch between multiple drivers setting
export VK_ICD_FILENAMES=/nix/store/<hash>-amdvlk-2020.Q1.2/share/vulkan/icd.d/amd_icd64.json
can be used.)Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)