Merge pull request #66238 from jonringer/update-vulkan

Update vulkan packages
This commit is contained in:
Aaron Andersen 2019-08-31 11:45:50 -04:00 committed by GitHub
commit 6951cbeea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 53 additions and 85 deletions

View File

@ -1,16 +1,29 @@
{ stdenv, fetchFromGitHub, cmake, bison, jq, python, spirv-tools, spirv-headers }:
{ stdenv, fetchFromGitHub
, bison
, cmake
, jq
, python3
, spirv-headers
, spirv-tools
}:
stdenv.mkDerivation rec {
name = "glslang-${version}";
version = "7.11.3113";
pname = "glslang";
version = "7.11.3214";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "${version}";
sha256 = "1kzv2b4q1fddxd7c0hc754nd6rw6y9vijb9fsi13xzzq9dficgb6";
rev = version;
sha256 = "0dqjga0lcza006fhac26zp2plbq4gx8a6nsmrwkqlzji6lw1jins";
};
nativeBuildInputs = [ cmake python bison jq ];
# These get set at all-packages, keep onto them for child drvs
passthru = {
inherit spirv-tools spirv-headers;
};
nativeBuildInputs = [ cmake python3 bison jq ];
enableParallelBuilding = true;
postPatch = ''
@ -18,6 +31,7 @@ stdenv.mkDerivation rec {
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
'';
# Ensure spirv-headers and spirv-tools match exactly to what is expected
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')

View File

@ -1,13 +1,14 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
name = "spirv-headers-${version}";
version = "2019.1"; # spirv-tools version whose DEPS file calls for this commit
pname = "spirv-headers";
version = "1.4.1";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f"; # from spirv-tools' DEPS
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
rev = version;
sha256 = "1zfmvg3x0q9w652s8g5m5rcckzm6jiiw8rif2qck4vlsryl55akp";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
name = "vulkan-headers-${version}";
version = "1.1.106";
version = "1.1.114.0";
buildInputs = [ cmake ];
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "sdk-${version}";
sha256 = "0idw7q715ikj575qmspvgq2gzc6c1sj581b8z3xnv6wz9qbzrmsd";
sha256 = "0fdvh26nxibylh32lj8b62d9nf9j25xa0il9zg362wmr2zgm8gka";
};
meta = with stdenv.lib; {

View File

@ -2,7 +2,7 @@
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
let
version = "1.1.106";
version = "1.1.114.0";
in
assert version == vulkan-headers.version;
@ -14,17 +14,15 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "sdk-${version}";
sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
sha256 = "08nibkbjf3g32qyp5bpdvj7i0zdv5ds1n5y52z8pvyzkpiz7s6ww";
};
nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
enableParallelBuilding = true;
patches = [ ./system-search-path.patch ];
cmakeFlags = [
"-DSYSTEM_SEARCH_PATH=${addOpenGLRunpath.driverLink}/share"
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
];

View File

@ -1,45 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ac5ce835..cbdb0ff56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,12 @@ if(UNIX)
STRING
"Search path to use when XDG_DATA_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant."
)
+ set(
+ SYSTEM_SEARCH_PATH ""
+ CACHE
+ STRING
+ "Search path to always use, after all other search paths."
+ )
endif()
if(UNIX AND NOT APPLE) # i.e.: Linux
@@ -184,6 +190,7 @@ if(UNIX)
add_definitions(-DFALLBACK_CONFIG_DIRS="${FALLBACK_CONFIG_DIRS}")
add_definitions(-DFALLBACK_DATA_DIRS="${FALLBACK_DATA_DIRS}")
add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
+ add_definitions(-DSYSTEM_SEARCH_PATH="${SYSTEM_SEARCH_PATH}")
# Make sure /etc is searched by the loader
if(NOT (CMAKE_INSTALL_FULL_SYSCONFDIR STREQUAL "/etc"))
diff --git a/loader/loader.c b/loader/loader.c
index 0d3b5a947..abe357004 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -3688,6 +3688,7 @@ static VkResult ReadDataFilesInSearchPaths(const struct loader_instance *inst, e
search_path_size += DetermineDataFilePathSize(xdgdatahome, rel_size);
search_path_size += DetermineDataFilePathSize(home_root, rel_size);
}
+ search_path_size += DetermineDataFilePathSize(SYSTEM_SEARCH_PATH, rel_size);
#endif
}
}
@@ -3737,6 +3738,7 @@ static VkResult ReadDataFilesInSearchPaths(const struct loader_instance *inst, e
CopyDataFilePath(xdgdatahome, relative_location, rel_size, &cur_path_ptr);
CopyDataFilePath(home_root, relative_location, rel_size, &cur_path_ptr);
}
+ CopyDataFilePath(SYSTEM_SEARCH_PATH, relative_location, rel_size, &cur_path_ptr);
}
// Remove the last path separator

View File

@ -1,10 +1,9 @@
{ stdenv, fetchFromGitHub, cmake, python, spirv-headers }:
{ stdenv, fetchFromGitHub, cmake, python3, spirv-headers }:
let
# Update spirv-headers rev in lockstep according to DEPs file
version = "2019.1";
version = "2019.3";
in
assert version == spirv-headers.version;
stdenv.mkDerivation rec {
name = "spirv-tools-${version}";
inherit version;
@ -13,11 +12,11 @@ stdenv.mkDerivation rec {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "v${version}";
sha256 = "0vddjzhkrhrm3l3i57nxmq2smv3r1s0ka5ff2kziaahr4hqb479r";
sha256 = "1wvipjcjsi815ls08s3dz9hwlbb59dbl4syxkskg1k9d5jjph1a8";
};
enableParallelBuilding = true;
buildInputs = [ cmake python ];
buildInputs = [ cmake python3 ];
cmakeFlags = [ "-DSPIRV-Headers_SOURCE_DIR=${spirv-headers.src}" ];

View File

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

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
name = "vulkan-tools-${version}";
version = "1.1.106.0";
version = "1.1.114.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Tools";
rev = "sdk-${version}";
sha256 = "0swqyk16mbkivyk79dpqbhpw05a7yrakqynywznr5zgqbc0z4gj8";
sha256 = "1d4fcy11gk21x7r7vywdcc1dy9j1d2j78hvd5vfh3vy9fnahx107";
};
nativeBuildInputs = [ cmake pkgconfig ];

View File

@ -7856,16 +7856,16 @@ in
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "117a1fd11f11e9bef9faa563c3d5156cc6ab529c";
sha256 = "1w5hb6sgy71g279wsghixxc75r7rsm7wki011mpz039q66827sym";
rev = "26c1b8878315a7a5c188df45e0bc236bb222b698";
sha256 = "1q76vaqwxf4q2l4rd7j2p2jqgcqpys0m235drzx0drkn2qd50n1b";
};
});
spirv-headers = spirv-tools.overrideAttrs (_: {
spirv-headers = spirv-headers.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "79b6681aadcb53c27d1052e5f8a0e82a981dbf2f";
sha256 = "0flng2rdmc4ndq3j71h6wk1ibcjvhjrg2rzd6rv445vcsf0jh2pj";
repo = "SPIRV-Headers";
rev = "2434b89345a50c018c84f42a310b0fad4f3fd94f";
sha256 = "1m902q1alm0rbh69zlskkx4n453xijijp9mf3wzwphi2j36gygwm";
};
});
};
@ -13989,24 +13989,24 @@ in
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "26c1b8878315a7a5c188df45e0bc236bb222b698";
sha256 = "1q76vaqwxf4q2l4rd7j2p2jqgcqpys0m235drzx0drkn2qd50n1b";
rev = "aa9e8f538041db3055ea443080e0ccc315fa114f";
sha256 = "1nbii0xa5zgs36dmpvzpli1jbzb9ijr7bkgvzmlpcjrjsl02cnbk";
};
});
spirv-headers = spirv-tools.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "2434b89345a50c018c84f42a310b0fad4f3fd94f";
sha256 = "1m902q1alm0rbh69zlskkx4n453xijijp9mf3wzwphi2j36gygwm";
rev = "45c2cc37276d69e5b257507d97fd90d2a5684ccc";
sha256 = "1jrzazv5j8nsn8hz5vc43vz4msps05d65wdy9spfg2hg36r1s2pm";
};
});
}).overrideAttrs (_: {
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "e06c7e9a515b716c731bda13f507546f107775d1";
sha256 = "04y4dd1cqdkd4qffmhgmg3agf9j07ii2w38vpp4jw53ir818bqdq";
rev = "333d1c95792692205472c457d7bec915a94c8000";
sha256 = "04srq1zcilhs7p1xz7wcnrncjxqskhfnqggisvxw5f774gk01ks6";
};
});
};