-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
swiftshader: init at 2020-03-31 #83874
Conversation
CC @Ralith |
Hey I'm currently testing the build of this, it takes very long mostly because it compiles all of *!@^ LLVM. Do you think @expipiplus1 you can make it use Nixpkgs' version of LLVM? |
Besides that build went out fine. |
It would definitely be nice to try to strip out as much of Can someone who's had the time to build this paste a list of the output files, and the contents of the manifest .json it installs, if any? |
Yikes, I didn't realise! After a quick search for |
@Ralith Here is a list of everything in the |
Rather, I'm interested in the contents of the resulting nix package (and of vk_swiftshader_icd.json). |
@Ralith ah sorry, here it is
|
For this to play nicely in a larger environment, it'll need some changes:
I expect something similar is necessary for the EGL library, but I'm not an expert on how glvnd works. See e.g. These changes should make it possible for swiftshader to exist as a first-class graphics device on a NixOS system alongside any actual hardware, and if upstreamed would likely be similarly useful to other distros. Otherwise, it will conflict with the regular graphics infrastructure. |
07d3628
to
f5cf7a2
Compare
@Ralith, I've changed things as you suggest, as well as copying what seems to be going on for glvnd. I've also raised an issue on the swiftshader tracker about using an external LLVM: https://bugs.chromium.org/p/swiftshader/issues/detail?id=146 |
Hi all, I'm the lead of SwiftShader. Thanks for your interest in providing it as a package in NixOS! As responded on https://bugs.chromium.org/p/swiftshader/issues/detail?id=146, we can't guarantee that building it with an external LLVM library will result in correct behavior. The libvulkan.so.1 binary is just a renamed copy of libvk_swiftshader.so. The latter is to be used as an ICD, while the former can be used on systems that lack a Vulkan Loader or for which we wish to skip it. That should probably only be done for testing purposes, so it can be left out of the package. |
f5cf7a2
to
2a682ce
Compare
I think given this, along with the fact that building with the in-tree LLVM was so easy we should keep it as the swiftshader team suggests.
Done. @Ralith and @doronbehar, if you agree with the above, I suppose all that's left would be to test using swiftshader as a graphics device for NixOS, or perhaps that could wait for a separate PR. |
Agreed. |
2a682ce
to
baaa386
Compare
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.
Haven't the build again but LGTM.
Changes look good; will try to test the vulkan aspects myself. |
Running
Running in gdb produces instead:
|
I get no segfault calling getPhysicalDeviceProperties with all possible types in the struct chain: https://gist.github.com/9a1e461a8b1a76a25af0cd0da99f2ae4; Perhaps vulkaninfo is doing something out of the ordinary (seems unlikely though)?
FWIW hello triangle worked out of the box: |
@Ralith This looks like a problem in (at least)
@c0d1f1ed Do you agree? would it be best to open an issue against swiftshader or vulkan-tools? |
That looks like a different crash than the one I observed. Note the presence of I think these are swiftshader bugs and probably don't need to block the merge of the package, particularly as actual graphics applications seem to work fine, and installation for graceful discovery by regular vulkan apps seems to work great. |
Yeah, because I removed an
Agree |
Is it possible to get this merged, please? |
baaa386
to
37e9b09
Compare
|
Is it possible to get this merged, please? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
PIng |
2020-04-17 -> 2020-06-17 |
hi, sorry for the delay. there are so many PRs and not enough people to review/merge everything. while trying to build this I got this error though:
could you maybe squash the commits into one also? cheers and thanks for contributing |
5e62adf
to
7ab91a3
Compare
No problem at all, I completely understand. Please don't take my pings as impatience!
Done!
:) |
src = fetchgit { | ||
url = "https://swiftshader.googlesource.com/SwiftShader"; | ||
rev = "763957e6b4fc1aa360ab19c4109b8b26686783e8"; | ||
sha256 = "0mp77cp85mbs83wpwqhn3myzdfdid8jdq2mxf65cchb643amdsr3"; |
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.
still seems to be a wrong hash.
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.
oops, fixed properly this time
7ab91a3
to
9e7da18
Compare
Thanks!
…On Fri, Jun 19, 2020 at 5:24 AM Lassulus ***@***.***> wrote:
Merged #83874 <#83874> into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#83874 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXEF3WZH62KISTMMEQTRXKAV7ANCNFSM4LXRIGJQ>
.
|
Motivation for this change
Although swiftshader is used as part of Chromium, it's not available as a
standalone package.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
) (Tested libvulkan.so.1)nix path-info -S
before and after)