Merge pull request #97976 from Flakebi/amdvlk
amdvlk: 2020.Q3.4 -> 2020.Q3.5 and add 32-bit build
This commit is contained in:
commit
04e9c9b0a3
@ -183,7 +183,12 @@ GPU1:
|
|||||||
be forced as follows:
|
be forced as follows:
|
||||||
|
|
||||||
<programlisting><xref linkend="opt-hardware.opengl.extraPackages"/> = [
|
<programlisting><xref linkend="opt-hardware.opengl.extraPackages"/> = [
|
||||||
<package>amdvlk</package>
|
pkgs.<package>amdvlk</package>
|
||||||
|
];
|
||||||
|
|
||||||
|
# To enable Vulkan support for 32-bit applications, also add:
|
||||||
|
<xref linkend="opt-hardware.opengl.extraPackages32"/> = [
|
||||||
|
pkgs.driversi686Linux.<package>amdvlk</package>
|
||||||
];
|
];
|
||||||
|
|
||||||
# For amdvlk
|
# For amdvlk
|
||||||
|
@ -15,16 +15,19 @@
|
|||||||
, xorg
|
, xorg
|
||||||
, zlib
|
, zlib
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
suffix = if stdenv.system == "x86_64-linux" then "64" else "32";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "amdvlk";
|
pname = "amdvlk";
|
||||||
version = "2020.Q3.4";
|
version = "2020.Q3.5";
|
||||||
|
|
||||||
src = fetchRepoProject {
|
src = fetchRepoProject {
|
||||||
name = "${pname}-src";
|
name = "${pname}-src";
|
||||||
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
|
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
|
||||||
rev = "refs/tags/v-${version}";
|
rev = "refs/tags/v-${version}";
|
||||||
sha256 = "13yy1v43wyw2dbanl39sk1798344smmycgvl3gla61ipqls0qfgd";
|
sha256 = "08fj3cg3axnwadlpfim23g5nyjl69044fqxdr57af6y79441njay";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -62,14 +65,24 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeDir = "../drivers/xgl";
|
cmakeDir = "../drivers/xgl";
|
||||||
|
|
||||||
|
# LTO is disabled in gcc for i686 as of #66528
|
||||||
|
cmakeFlags = stdenv.lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"];
|
||||||
|
|
||||||
|
postPatch = stdenv.lib.optionalString stdenv.is32bit ''
|
||||||
|
substituteInPlace drivers/pal/cmake/PalCompilerOptions.cmake \
|
||||||
|
--replace "pal_setup_gcc_ipo()" ""
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm755 -t $out/lib icd/amdvlk64.so
|
install -Dm755 -t $out/lib icd/amdvlk${suffix}.so
|
||||||
install -Dm644 -t $out/share/vulkan/icd.d ../drivers/AMDVLK/json/Redhat/amd_icd64.json
|
install -Dm644 -t $out/share/vulkan/icd.d ../drivers/AMDVLK/json/Redhat/amd_icd${suffix}.json
|
||||||
|
|
||||||
substituteInPlace $out/share/vulkan/icd.d/amd_icd64.json --replace \
|
substituteInPlace $out/share/vulkan/icd.d/amd_icd${suffix}.json --replace \
|
||||||
"/usr/lib64" "$out/lib"
|
"/usr/lib64" "$out/lib"
|
||||||
|
substituteInPlace $out/share/vulkan/icd.d/amd_icd${suffix}.json --replace \
|
||||||
|
"/usr/lib" "$out/lib"
|
||||||
|
|
||||||
patchelf --set-rpath "$rpath" $out/lib/amdvlk64.so
|
patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Keep the rpath, otherwise vulkaninfo and vkcube segfault
|
# Keep the rpath, otherwise vulkaninfo and vkcube segfault
|
||||||
@ -80,7 +93,7 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
|
homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
|
||||||
changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${version}";
|
changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||||
maintainers = with maintainers; [ danieldk Flakebi ];
|
maintainers = with maintainers; [ danieldk Flakebi ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -12159,6 +12159,7 @@ in
|
|||||||
# Multi-arch "drivers" which we want to build for i686.
|
# Multi-arch "drivers" which we want to build for i686.
|
||||||
driversi686Linux = recurseIntoAttrs {
|
driversi686Linux = recurseIntoAttrs {
|
||||||
inherit (pkgsi686Linux)
|
inherit (pkgsi686Linux)
|
||||||
|
amdvlk
|
||||||
mesa
|
mesa
|
||||||
vaapiIntel
|
vaapiIntel
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
|
Loading…
Reference in New Issue
Block a user