-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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 22.3.1 #204125
Mesa 22.3.1 #204125
Conversation
diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build | ||
index a968dee52db..ebda0045ea8 100644 | ||
--- a/src/gallium/targets/rusticl/meson.build | ||
+++ b/src/gallium/targets/rusticl/meson.build | ||
@@ -59,7 +59,7 @@ configure_file( | ||
input : 'rusticl.icd.in', | ||
output : 'rusticl.icd', | ||
install : true, | ||
- install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'), | ||
+ install_dir : join_paths(get_option('prefix'), 'etc', 'OpenCL', 'vendors'), | ||
) | ||
|
||
if meson.version().version_compare('>= 0.58') |
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.
Maybe consider adding a sysconfdir_install
option like pulseaudio and fwupd?
https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch
https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
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.
We should actually probably just not install those files, as we end up deleting them in postInstall
anyway.
rust-bindgen' = rust-bindgen.override { | ||
rust-bindgen-unwrapped = rust-bindgen.unwrapped.override { | ||
clang = llvmPackages.clang; | ||
}; | ||
}; |
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.
Can you please explain why this is necessary? Sorry, I don't understand it.
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.
The default bindgen is wrapped with libclang 11 which is too old for building rusticl.
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.
Maybe the default rust-bindgen
is worth bumping to newer clang? (in a different PR, preferably) Maintainers: @JohnTitor, @Ralith.
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.
Unfortunately the proper solution here is probably to version bindgen (if not rust), as different packages will want a different LLVM in the closure.
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.
to make this a little less ugly I would suggest to add an easier way to overwrite clang for rust-bindgen.
pkgs/top-level/all-packages.nix
Outdated
libclc = callPackage ../development/libraries/libclc { }; | ||
libclc = callPackage ../development/libraries/libclc { | ||
llvmPackages = llvmPackages_latest; | ||
}; |
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.
I just built libclc
successfully against the regular llvmPackages
on NixOS 22.11. The override with llvmPackages_latest
doesn't seem to be necessary.
Derivation
{
"/nix/store/l4ccy0bjw1h8i8j32w4xrxrbijxy109r-libclc-14.0.6.drv": {
"outputs": {
"out": {
"path": "/nix/store/sws900kbpmmjwpfsfdp3kn9x7mgpmw1c-libclc-14.0.6"
}
},
"inputSrcs": [
"/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh"
],
"inputDrvs": {
"/nix/store/05n8dblmwlkafylbai3hhx4nz88g2vbz-clang-11.1.0.drv": [
"dev",
"out"
],
"/nix/store/11dz31m8rb8lmh9r9jy6imph8wbqmsv3-cmake-3.24.3.drv": [
"out"
],
"/nix/store/1kbciw3fk38lvwv5kmc4zgz0f6dqldx8-source.drv": [
"out"
],
"/nix/store/2knhp55njxnhh7j1l0w7ns0hi6bxmn1k-stdenv-linux.drv": [
"out"
],
"/nix/store/3sjd4vvbdssljiy45a9igjy9kkxd2skq-bash-5.1-p16.drv": [
"out"
],
"/nix/store/8gka1ln4n7xi55hgkj8qdixydg7kwlcf-ninja-1.11.1.drv": [
"out"
],
"/nix/store/hgv33pjyznisg95ljrygyxk4xc7fbrp5-llvm-11.1.0.drv": [
"dev"
],
"/nix/store/kxfzn11kf6nh0igzsgfm72zfxj77lsda-python3-3.10.8.drv": [
"out"
],
"/nix/store/lrljsy25g5las83hhfxlqrjgch4dlm53-SPIRV-LLVM-Translator-unstable-2022-05-04.drv": [
"out"
]
},
"system": "x86_64-linux",
"builder": "/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash",
"args": [
"-e",
"/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh"
],
"env": {
"buildInputs": "/nix/store/kzf7caq6grrh0gjchwajv9v264vfwlr9-llvm-11.1.0-dev /nix/store/0ammdv24jk6iz35gd7psha0li6g6k5d4-clang-11.1.0-dev",
"builder": "/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash",
"cmakeFlags": "-DCMAKE_INSTALL_INCLUDEDIR=include",
"configureFlags": "",
"depsBuildBuild": "",
"depsBuildBuildPropagated": "",
"depsBuildTarget": "",
"depsBuildTargetPropagated": "",
"depsHostHost": "",
"depsHostHostPropagated": "",
"depsTargetTarget": "",
"depsTargetTargetPropagated": "",
"doCheck": "",
"doInstallCheck": "",
"mesonFlags": "",
"name": "libclc-14.0.6",
"nativeBuildInputs": "/nix/store/rxb9zl1mdx9f2n3z0nyv9zhngj3f2pw0-cmake-3.24.3 /nix/store/lfj3vna0mcps3fcjlg5gw4jss05kvgry-ninja-1.11.1 /nix/store/zdba9frlxj2ba8ca095win3nphsiiqhb-python3-3.10.8 /nix/store/91i4dkyivd1i5jljyy2l14pbbyf8kwn1-SPIRV-LLVM-Translator-unstable-2022-05-04",
"out": "/nix/store/sws900kbpmmjwpfsfdp3kn9x7mgpmw1c-libclc-14.0.6",
"outputs": "out",
"patches": "",
"pname": "libclc",
"postPatch": "substituteInPlace CMakeLists.txt \\\n --replace 'find_program( LLVM_CLANG clang PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )' \\\n 'find_program( LLVM_CLANG clang PATHS \"/nix/store/6zka9igv5cif9k4h6zf37y9sjlnbq8n3-clang-11.1.0/bin\" NO_DEFAULT_PATH )' \\\n --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )' \\\n 'find_program( LLVM_SPIRV llvm-spirv PATHS \"/nix/store/91i4dkyivd1i5jljyy2l14pbbyf8kwn1-SPIRV-LLVM-Translator-unstable-2022-05-04/bin\" NO_DEFAULT_PATH )'\n",
"propagatedBuildInputs": "",
"propagatedNativeBuildInputs": "",
"sourceRoot": "source/libclc",
"src": "/nix/store/v4nsp8wi4p9iv73202k9kp0hbcj1lfcr-source",
"stdenv": "/nix/store/kmfaajdpyyyg319vfqni5jm9wkxjmf73-stdenv-linux",
"strictDeps": "1",
"system": "x86_64-linux",
"version": "14.0.6"
}
}
}
I've also push the path to my Cachix.
7a45c69
to
27a8e37
Compare
We probably also have to add this patch for an upstream regression: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145 |
We usually wait for a x.y.1 release for this reason. |
Target should be staging. |
I'll retarget later, there are too many rebuilds on current staging to test this reasonably quickly. |
Unless mesa was directly modified in staging in a way that would conflict, you don't need to rebase; you only need to change the target branch in the PR settings. Staging is master + some extra, you can merge master into that. Anything that touches mesa will need to rebuild a ton of large packages. It's not as many as I had thought but still enough to warrant staging I think. |
Yes, of course this will target staging later but for now not targeting it keeps the amounts of required rebuilds for local testing lower. |
Intel Arc GPUs on this version need |
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.
Have you tested rusticl with luxmark?
I rebased my overlay with yours' mesa + 22.3 branch. When I have /run/opengl-drivers/etc/OpenCL/vendors/rusticl.icd
it crashes with:
mesa: CommandLine Error: Option 'limited-coverage-experimental' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Otherwise, it works.
pkgs/top-level/all-packages.nix
Outdated
@@ -20241,7 +20241,9 @@ with pkgs; | |||
|
|||
libcint = callPackage ../development/libraries/libcint { }; | |||
|
|||
libclc = callPackage ../development/libraries/libclc { }; | |||
libclc = callPackage ../development/libraries/libclc { | |||
llvmPackages = llvmPackages_latest; |
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.
Does it make sense to?:
llvmPackages = llvmPackages_latest; | |
llvmPackages = llvmPackages_latest; | |
spirv-llvm-translator = spirv-llvm-translator_14; |
It looks like trying to load multiple LLVMs in the same process makes things explode, both with Intel and with ROCm. We need to settle on one LLVM version for everything, or have exactly one ICD at a time... |
Fix for Arc GPUs merged, no point release yet. It's quite broken without it so please hold off on merging until that's in! |
@LunNova we won't merge this until 22.3.1 anyways. |
22.3.1 is out now |
Are those not supported on the standalone compiler backend? |
Not directly sure, though I couldn't get any EGL/OpenGL anything to work without a newer LLVM, so I suspect they're not supported on standalone |
There's #194634 |
Ooh nice, past the LLVM version the new mesa works 100% fine on my side as well (though with OpenCL disabled)
|
Want to note here: |
Fixes #206868 |
Update on the 32bit issue!
I've got it completely working! |
@cidkidnix got it working how? |
mesa223 is this PRs pkgs |
@cidkidnix does this PR's |
@cidkidnix that shouldn't be necessary for a 32-bit build; nixpkgs' cross-compilation package set "splicing" mechanism should be feeding in dependencies from the appropriate package set. It works fine for me just altering mesa's |
If you're trying to override both versions then something like this also works.
|
While I would usually suspect that for some reason 64Bit elfs/so's were being fed into the i686Linux build causing the linker to freak out. I thought splicing should've resolved this for me (as I'm aware of splicing) but it did not. also good point @LunNova, didn't think of making a function to make it a bit easier EDIT: to note I have a somewhat weird overlay setup which might be causing some of the splicing issues |
I can confirm this PR works with LLVM14 for x86_64 and i686, for the same GPUs we already support, from 22.3.0 tag to the latest commit in the Let's merge this one as it is, we can draft a PR for LLVM 15 (for newer GPUs) and maybe another that enhances the rust-toolchain. |
The only thing I'd like to see before merging this is some extra confirmation that Rusticl works, since I currently have no Intel hardware to test on. |
@K900 rusticl is still pretty experimental upstream; especially on ARC. If it doesn't work, that's a problem we can fix later (if it's on us to fix at all). If you don't feel comfortable with it, we could even disable it by default and leave proper rusticl enablement for later. It's great to already have the flag in now for testing; you've already done more than enough for a mere version bump PR IMO. |
I mean, I'm fine with it being buggy, I just want to make sure it works, because if it doesn't, all the LLVM version nonsense can be removed. |
Is Mesa 22.3.1 also coming to NixOS 22.11? With the current Mesa 22.2 screensharing is broken on Intel Tiger Lake GPUs: https://gitlab.freedesktop.org/drm/intel/-/issues/4825 |
I think we'll have to, as Arc and RDNA3 are both very iffy on 22.2. |
Well, that's a tough call. Certainly not before it's in EDIT: maybe we could provide both options. |
The good news is, Rusticl works on Iris:
The bad news is, it might only work with |
It is generally useful, and it also makes rusticl work for ??? reasons ???
It does in fact only work with |
@ofborg eval |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/updates-to-pkgs-not-appearing-in-unstable/24706/1 |
Description of changes
Disgusting LLVM hacks inside. Probably breaks other libclc stuff. Barely tested. Have fun.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes