diff options
author | Christoph Haag | 2017-12-22 14:02:05 +0100 |
---|---|---|
committer | Christoph Haag | 2017-12-22 14:02:46 +0100 |
commit | d0fb1478748c8d1aef8de99a00b35f53b8d57f24 (patch) | |
tree | 3c3fb4f70d2f1ab4a98d6e874ad2b914d7aa09b8 | |
download | aur-d0fb1478748c8d1aef8de99a00b35f53b8d57f24.tar.gz |
initial
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 0001-fix-compile-error-on-clang.patch | 27 | ||||
-rw-r--r-- | 0001-remove-linking-with-whole-archive.patch | 46 | ||||
-rw-r--r-- | 0001-workaround-remove-invalid-constexpr-modifier.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 69 |
5 files changed, 213 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..163c48f63b97 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +# Generated by mksrcinfo v8 +# Fri Dec 22 13:02:03 UTC 2017 +pkgbase = amdvlk-git + pkgdesc = AMD's standalone Vulkan driver + pkgver = r6.a17a806 + pkgrel = 1 + url = https://github.com/GPUOpen-Drivers + arch = x86_64 + license = MIT + depends = vulkan-icd-loader + provides = vulkan-amdvlk + source = git+https://github.com/GPUOpen-Drivers/llvm.git + source = git+https://github.com/GPUOpen-Drivers/xgl.git + source = git+https://github.com/GPUOpen-Drivers/pal.git + source = git+https://github.com/GPUOpen-Drivers/AMDVLK.git + source = 0001-workaround-remove-invalid-constexpr-modifier.patch + source = 0001-fix-compile-error-on-clang.patch + source = 0001-remove-linking-with-whole-archive.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 784f2f61f8fbaab84a9015b7f9ade26ece43ccda20fd42b357fe911af5233a2b + sha256sums = 9d2399c3cfd424c5c0645892306f1794de61a8270f95683ea1785a78e0326c5c + sha256sums = 4669fda7c492ae6f655e9ad3bb2c4782753b49350a29af29883d43c02d627f46 + +pkgname = amdvlk-git + diff --git a/0001-fix-compile-error-on-clang.patch b/0001-fix-compile-error-on-clang.patch new file mode 100644 index 000000000000..1065b2eea4f1 --- /dev/null +++ b/0001-fix-compile-error-on-clang.patch @@ -0,0 +1,27 @@ +From d51507637e29281152b47ef30a3488c29c2a0955 Mon Sep 17 00:00:00 2001 +From: Christoph Haag <haagch@frickel.club> +Date: Fri, 22 Dec 2017 13:03:43 +0100 +Subject: [PATCH] fix compile error on clang + +xgl/icd/api/llpc/util/llpcDebug.cpp:116:10: error: reference to scoped enumeration must use 'enum' not 'enum class' + enum class ResourceMappingNodeType type) // Resource map node type +--- + icd/api/llpc/util/llpcDebug.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/icd/api/llpc/util/llpcDebug.cpp b/icd/api/llpc/util/llpcDebug.cpp +index 1273cd6..847786e 100644 +--- a/icd/api/llpc/util/llpcDebug.cpp ++++ b/icd/api/llpc/util/llpcDebug.cpp +@@ -113,7 +113,7 @@ bool EnableErrs() + // Translates enum "ResourceMappingNodeType" to string and output to ostream. + raw_ostream& operator<<( + raw_ostream& out, // [out] Output stream +- enum class ResourceMappingNodeType type) // Resource map node type ++ enum ResourceMappingNodeType type) // Resource map node type + { + const char* pString = nullptr; + switch (type) +-- +2.15.1 + diff --git a/0001-remove-linking-with-whole-archive.patch b/0001-remove-linking-with-whole-archive.patch new file mode 100644 index 000000000000..be99d0061bc2 --- /dev/null +++ b/0001-remove-linking-with-whole-archive.patch @@ -0,0 +1,46 @@ +From d56190445766f1b8ff7ddeb46f88c3609bd6dea7 Mon Sep 17 00:00:00 2001 +From: Christoph Haag <haagch@frickel.club> +Date: Fri, 22 Dec 2017 13:46:09 +0100 +Subject: [PATCH] remove linking with --whole-archive + +it breaks the build by linking pal twice and duplicating its symbols +--- + icd/CMakeLists.txt | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt +index 4e4d669..372783a 100644 +--- a/icd/CMakeLists.txt ++++ b/icd/CMakeLists.txt +@@ -530,17 +530,17 @@ if (UNIX) + + # CMAKE-TODO: What is whole-archive used for? + #target_link_libraries(xgl -Wl,--whole-archive ${ICD_LIBS} -Wl,--no-whole-archive) +- if(CMAKE_BUILD_TYPE_RELEASE) +- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) +- if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL 5.3) +- target_link_libraries(xgl PRIVATE -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/src/libpal.a -Wl,--no-whole-archive) +- target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive) +- target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive) +- target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/vam/libvam.a -Wl,--no-whole-archive) +- target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/addrlib/libaddrlib.a -Wl,--no-whole-archive) +- target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/jemalloc/libjemalloc.a -Wl,--no-whole-archive) +- endif() +- endif() ++# if(CMAKE_BUILD_TYPE_RELEASE) ++# execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) ++# if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL 5.3) ++# target_link_libraries(xgl PRIVATE -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/src/libpal.a -Wl,--no-whole-archive) ++# target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive) ++# target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive) ++# target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/vam/libvam.a -Wl,--no-whole-archive) ++# target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/addrlib/libaddrlib.a -Wl,--no-whole-archive) ++# target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/jemalloc/libjemalloc.a -Wl,--no-whole-archive) ++# endif() ++# endif() + + #${ICD_TARGET}.so${SO_VERSION_NUMBER} : ${filter-out -Wl%,$(LLLIBS}) + +-- +2.15.1 + diff --git a/0001-workaround-remove-invalid-constexpr-modifier.patch b/0001-workaround-remove-invalid-constexpr-modifier.patch new file mode 100644 index 000000000000..8bebe73e6163 --- /dev/null +++ b/0001-workaround-remove-invalid-constexpr-modifier.patch @@ -0,0 +1,43 @@ +From f6eeea01b0f25c887fab451af151e43a4c1c65d0 Mon Sep 17 00:00:00 2001 +From: Christoph Haag <haagch@frickel.club> +Date: Fri, 22 Dec 2017 12:56:32 +0100 +Subject: [PATCH] workaround: remove invalid constexpr modifier + +--- + src/util/math.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/util/math.cpp b/src/util/math.cpp +index 46e9ede..3af4259 100644 +--- a/src/util/math.cpp ++++ b/src/util/math.cpp +@@ -54,7 +54,7 @@ static uint32 Float32ToFloatN(float f, const NBitFloatInfo& info); + static float FloatNToFloat32(uint32 fBits, const NBitFloatInfo& info); + + // Initialize the descriptors for various N-bit floating point representations: +-static constexpr NBitFloatInfo Float16Info = ++static NBitFloatInfo Float16Info = + { + 16, // numBits + 10, // numFracBits +@@ -72,7 +72,7 @@ static constexpr NBitFloatInfo Float16Info = + (23 - 10), // fracBitsDiff + }; + +-static constexpr NBitFloatInfo Float11Info = ++static NBitFloatInfo Float11Info = + { + 11, // numBits + 6, // numFracBits +@@ -90,7 +90,7 @@ static constexpr NBitFloatInfo Float11Info = + 23 - 6, // fracBitsDiff + }; + +-static constexpr NBitFloatInfo Float10Info = ++static NBitFloatInfo Float10Info = + { + 10, // numBits + 5, // numFracBits +-- +2.15.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..86605ca70703 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Christoph Haag <haagch@studi.informatik.uni-stuttgart.de> +# Maintainer: Laurent Carlier <lordheavym@gmail.com> + +pkgname=amdvlk-git +pkgver=r6.a17a806 +pkgrel=1 +pkgdesc="AMD's standalone Vulkan driver" +arch=(x86_64) +url="https://github.com/GPUOpen-Drivers" +license=('MIT') +depends=('vulkan-icd-loader') +provides=(vulkan-amdvlk) +#conflicts=() +#TODO: makedepends=('libdrm' 'dri2proto' 'glproto' 'libxxf86vm' 'libxdamage' 'expat>=2.0.1' 'libxmu' +# 'talloc' 'wayland' 'pkgconfig' 'imake' 'xorg-server-devel' 'python2-mako' 'python' 'git') + +source=('git+https://github.com/GPUOpen-Drivers/llvm.git' + 'git+https://github.com/GPUOpen-Drivers/xgl.git' + 'git+https://github.com/GPUOpen-Drivers/pal.git' + 'git+https://github.com/GPUOpen-Drivers/AMDVLK.git' + '0001-workaround-remove-invalid-constexpr-modifier.patch' + '0001-fix-compile-error-on-clang.patch' # TODO: maybe not necessary on gcc + '0001-remove-linking-with-whole-archive.patch') +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + '784f2f61f8fbaab84a9015b7f9ade26ece43ccda20fd42b357fe911af5233a2b' + '9d2399c3cfd424c5c0645892306f1794de61a8270f95683ea1785a78e0326c5c' + '4669fda7c492ae6f655e9ad3bb2c4782753b49350a29af29883d43c02d627f46') +pkgver() { + XGL_VER=$(cd xgl; printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") + #PAL_VER=$(cd pal; printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") + echo "$XGL_VER" +} + +prepare() { + cd pal + git am -3 ../0001-workaround-remove-invalid-constexpr-modifier.patch + cd .. + cd xgl + git am -3 ../0001-fix-compile-error-on-clang.patch + git am -3 ../0001-remove-linking-with-whole-archive.patch +} + +build() { + echo "building xgl..." + cd xgl + cmake -H. -Bbuilds/Release64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=$PWD/../pal/cmake/Modules -DXGL_PAL_PATH:PATH=$PWD/../pal -DCMAKE_C_FLAGS="-DLINUX -D__x86_64__ -D__AMD64__" -DCMAKE_CXX_FLAGS="-DLINUX -D__x86_64__ -D__AMD64__" -DXGL_LLVM_SRC_PATH=$PWD/../llvm + cd builds/Release64 + make + echo "bulding xgl finished!" +} + +package() { + install -m755 -d "${pkgdir}"/etc/vulkan/icd.d + install -m755 -d "${pkgdir}"/usr/lib + + install xgl/builds/Release64/icd/amdvlk64.so "${pkgdir}"/usr/lib/ + +echo '{ + "file_format_version": "1.0.0", + "ICD": { + "library_path": "/usr/lib64/amdvlk64.so", + "abi_versions": "0.9.0" + } +} +' >> "${pkgdir}"/etc/vulkan/icd.d/amd_icd64.json +} |