Merge pull request #55959 from Ralith/vulkan

Update Vulkan packages
This commit is contained in:
Silvan Mosberger 2019-03-30 23:53:09 +01:00 committed by GitHub
commit c1e2855bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 98 additions and 54 deletions

View File

@ -1,35 +1,32 @@
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bison, spirv-tools, jq }:
{ stdenv, fetchFromGitHub, fetchpatch, cmake, bison, jq, python, spirv-tools, spirv-headers }:
stdenv.mkDerivation rec {
name = "glslang-git-${version}";
version = "2018-09-26";
name = "glslang-${version}";
version = "7.11.3113";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "91ac4290bcf2cb930b4fb0981f09c00c0b6797e1";
sha256 = "0q477pm0n495acnss16ddlf82a6i5l2dfmvc7r8yi0bgmgpzi4av";
rev = "${version}";
sha256 = "1kzv2b4q1fddxd7c0hc754nd6rw6y9vijb9fsi13xzzq9dficgb6";
};
buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs;
nativeBuildInputs = [ cmake python bison jq ];
enableParallelBuilding = true;
postPatch = ''
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
'';
preConfigure = ''
HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit')
TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit')
if [ "$HEADERS_COMMIT" != "${spirv-tools.headers.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
if [ "$HEADERS_COMMIT" != "${spirv-headers.src.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
echo "ERROR: spirv-tools commits do not match expected versions: expected tools at $TOOLS_COMMIT, headers at $HEADERS_COMMIT";
exit 1;
fi
'';
doCheck = false; # fails 3 out of 3 tests (ctest)
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";

View File

@ -0,0 +1,21 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
name = "spirv-headers-${version}";
version = "2019.1"; # spirv-tools version whose DEPS file calls for this commit
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f"; # from spirv-tools' DEPS
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
};
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Machine-readable components of the Khronos SPIR-V Registry";
license = licenses.mit;
maintainers = [ maintainers.ralith ];
};
}

View File

@ -1,15 +1,15 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
name = "vulkan-headers-${version}";
version = "1.1.85";
version = "1.1.101.0";
buildInputs = [ cmake ];
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "2fd5a24ec4a6df303b2155b3f85b6b8c1d56f6c0";
sha256 = "0cj4bd396qddh3nxvr7grnpfz89g3sbvm21cx4k3ga52sp1rslpb";
rev = "sdk-${version}";
sha256 = "1rrpkibi4lnd9j63aarjk74z0xf4sy30zh8psq1vj92r21hfjr6m";
};
meta = with stdenv.lib; {

View File

@ -2,7 +2,7 @@
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, libGL_driver }:
let
version = "1.1.85";
version = "1.1.101.0";
in
assert version == vulkan-headers.version;
@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "b02f64293680c484e1d7ff6ecb88f89277c0dc8c";
sha256 = "1n4vjyxlmi2ygx34srwbvalc5gz95gcsrmdw0k10353xja755gmj";
rev = "sdk-${version}";
sha256 = "0x891bha9mlsh4cvq59d1qnb4fnalwf6ml2b9y221cr7hikilamw";
};
nativeBuildInputs = [ pkgconfig ];
@ -28,10 +28,6 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
postInstall = ''
cp -r "${vulkan-headers}/include" "$dev"
'';
meta = with stdenv.lib; {
description = "LunarG Vulkan loader";
homepage = https://www.lunarg.com;

View File

@ -1,38 +1,25 @@
{ stdenv, fetchFromGitHub, cmake, python }:
{ stdenv, fetchFromGitHub, cmake, python, spirv-headers }:
let
spirv_sources = {
# `glslang` requires a specific version of `spirv-tools` and `spirv-headers` as specified in `known-good.json`.
tools = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "9bfe0eb25e3dfdf4f3fd86ab6c0cda009c9bd661";
sha256 = "1spfii4zib1lmz40vnz1d1cr6is7q2n7rvar1vfzi33gwrn8rqhi";
};
headers = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "d5b2e1255f706ce1f88812217e9a554f299848af";
sha256 = "18530mpa030ckjhn78z9vbfd35l5jgh3mg22ra6k8gw8zx4wjhsl";
};
};
# Update spirv-headers rev in lockstep according to DEPs file
version = "2019.1";
in
assert version == spirv-headers.version;
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
version = "2018-09-20";
inherit version;
src = spirv_sources.tools;
patchPhase = ''ln -sv ${spirv_sources.headers} external/spirv-headers'';
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "v${version}";
sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r";
};
enableParallelBuilding = true;
buildInputs = [ cmake python ];
passthru = {
headers = spirv_sources.headers;
};
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;

View File

@ -1,16 +1,15 @@
{ stdenv, fetchFromGitHub, cmake, writeText, python3
{ stdenv, callPackage, fetchFromGitHub, cmake, writeText, python3
, vulkan-headers, vulkan-loader, glslang
, pkgconfig, xlibsWrapper, libxcb, libXrandr, wayland }:
stdenv.mkDerivation rec {
name = "vulkan-validation-layers-${version}";
version = "1.1.85.0";
version = "1.1.101.0"; # WARNING: glslang overrides in all-packages.nix must be updated to match known-good.json!
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-ValidationLayers";
rev = "sdk-${version}";
sha256 = "1y5ny587h62139fxnz760hsyv1dmw29m1a9vq096sn8qafh3jzbz";
sha256 = "00gz72m393i3m3rh5hv9d0znzlz39cpw35ifchzb4cr11bi4mzyz";
};
nativeBuildInputs = [ pkgconfig ];

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "vulkan-tools-${version}";
version = "1.1.92";
version = "1.1.101.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Tools";
rev = "sdk-${version}";
sha256 = "1khbfxp2mha7h0vqs0fkqscxm76gn3zlia8yya11lkhk7sn3h0d3";
sha256 = "03227qxa8q19qgzk30h0h49sh03idr6vh9srnrhiziw2vzmahmpp";
};
nativeBuildInputs = [ cmake pkgconfig ];

View File

@ -7214,7 +7214,24 @@ in
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});
glslang = callPackage ../development/compilers/glslang { };
glslang = callPackage ../development/compilers/glslang {
spirv-tools = spirv-tools.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "117a1fd11f11e9bef9faa563c3d5156cc6ab529c";
sha256 = "1w5hb6sgy71g279wsghixxc75r7rsm7wki011mpz039q66827sym";
};
});
spirv-headers = spirv-tools.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f";
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
};
});
};
go_bootstrap = if stdenv.isAarch64 then
srcOnly {
@ -9286,6 +9303,7 @@ in
spin = callPackage ../development/tools/analysis/spin { };
spirv-headers = callPackage ../development/libraries/spirv-headers { };
spirv-tools = callPackage ../development/tools/spirv-tools { };
splint = callPackage ../development/tools/analysis/splint {
@ -13117,7 +13135,33 @@ in
vulkan-headers = callPackage ../development/libraries/vulkan-headers { };
vulkan-loader = callPackage ../development/libraries/vulkan-loader { };
vulkan-tools = callPackage ../tools/graphics/vulkan-tools { };
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers { };
vulkan-validation-layers = callPackage ../development/tools/vulkan-validation-layers {
glslang = (glslang.override {
spirv-tools = spirv-tools.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "5994ae2a045015004cce24802dc47c33736486ea";
sha256 = "1w1zkql03aggma31nz4xb1b5waxxf2jcg99slzvmihg9ngmmlbm6";
};
});
spirv-headers = spirv-tools.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f";
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
};
});
}).overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "5432f0dd8f331f15182681664d7486681e8514e6";
sha256 = "0spdm93qkx83z8bks61am2g3ary7fkibvhqq706nj4z9wx4k0cbm";
};
});
};
vtkWithQt4 = vtk.override { qtLib = qt4; };