-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Even more more vulkan updates #229749
Even more more vulkan updates #229749
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,30 @@ | |
, libXdmcp | ||
, libXrandr | ||
, spirv-headers | ||
, spirv-tools | ||
, vulkan-headers | ||
, wayland | ||
}: | ||
|
||
let | ||
robin-hood-hashing = callPackage ./robin-hood-hashing.nix {}; | ||
|
||
# Current VVL version requires a newer spirv-headers than the latest release tag. | ||
# This should hopefully not be too common and the override should be removed after | ||
# the next SPIRV headers release. | ||
# FIXME: if this ever becomes common, figure out a way to pull revisions directly | ||
# from upstream known-good.json | ||
spirv-headers' = spirv-headers.overrideAttrs(_: { | ||
version = "unstable-2023-04-27"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "KhronosGroup"; | ||
repo = "SPIRV-Headers"; | ||
rev = "7f1d2f4158704337aff1f739c8e494afc5716e7e"; | ||
hash = "sha256-DHOYIZQqP5uWDYdb+vePpMBaQDOCB5Pcg8wPBMF8itk="; | ||
}; | ||
|
||
postPatch = ""; | ||
}); | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "vulkan-validation-layers"; | ||
|
@@ -34,7 +51,7 @@ stdenv.mkDerivation rec { | |
owner = "KhronosGroup"; | ||
repo = "Vulkan-ValidationLayers"; | ||
rev = "v${version}"; | ||
hash = "sha256-viVceH8qFz6Cl/RlMMWZnMIdzULELlnIvtPZ87ySs2M="; | ||
hash = "sha256-+Vjy3hzzpC+bFNSEHLsfUaaHMSrMv2G+B8lGjui0fJs="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
|
@@ -50,14 +67,13 @@ stdenv.mkDerivation rec { | |
libXrandr | ||
libffi | ||
libxcb | ||
spirv-tools | ||
vulkan-headers | ||
wayland | ||
]; | ||
|
||
cmakeFlags = [ | ||
"-DGLSLANG_INSTALL_DIR=${glslang}" | ||
"-DSPIRV_HEADERS_INSTALL_DIR=${spirv-headers}" | ||
"-DSPIRV_HEADERS_INSTALL_DIR=${spirv-headers'}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, intentional to use the override above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh :D sorry mb There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if there's precedent for using |
||
"-DROBIN_HOOD_HASHING_INSTALL_DIR=${robin-hood-hashing}" | ||
"-DBUILD_LAYER_SUPPORT_FILES=ON" | ||
"-DPKG_CONFIG_EXECUTABLE=${pkg-config}/bin/pkg-config" | ||
|
@@ -84,6 +100,5 @@ stdenv.mkDerivation rec { | |
platforms = platforms.linux; | ||
license = licenses.asl20; | ||
maintainers = [ maintainers.ralith ]; | ||
broken = (lib.all (pkg: pkg.version != version) [vulkan-headers glslang spirv-tools spirv-headers]); | ||
}; | ||
} |
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.
It's okay on how it is now. But next time a Nintendo emulator requires these amount of error-prone diffs, we should just override in it instead. The Vulkan SDK still looks more appropriate for a distro to supply.
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 agree that we should stick to SDK releases.
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.
It's not just a Nintendo emulator, it's entirely possible for those extensions to be used by other things as well, e.g. DXVK. It may be a better idea to build the validation layers and other development tools with the SDK versions of everything, but use the latest headers and loader by default.
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.
It's possible for stuff to use bleeding edge interfaces, yeah, but quite rare for people to front run the SDK in my experience. Stable nixpkgs will inevitably lag regardless; better that it lag at a well-defined, supported point.
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'm kinda hoping we can nudge upstream into just having proper spec-versioned tags for everything, and then this just won't be an issue.
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.
Filed upstream: KhronosGroup/SPIRV-Headers#345