mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
media-libs/amdgpu-pro-vulkan: add scripts and update elog
* some programs have a bug when VK_ICD_FILENAMES is not set the can use the wrong Vulkan ICD * (since it exist multiple ICD for AMD GPU) * * since PRO driver don't support the AMD_VULKAN_ICD variable * was implemented this fix: * * Added vk_pro and vk_radv scripts: * vk_pro - launch programs using AMDGPU-PRO Vulkan ICD * vk_radv - launch programs using RADV Vulkan ICD Closes: https://bugs.gentoo.org/917447 Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Sam James
parent
a317ada944
commit
d8d414e9b2
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -42,6 +42,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -105,4 +107,16 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -44,6 +44,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -115,20 +117,19 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if use abi_x86_32; then
|
||||
elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog "must be set beforehand"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use abi_x86_64; then
|
||||
elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
|
||||
elog "must be set beforehand"
|
||||
fi
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -48,6 +48,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -119,20 +121,16 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if use abi_x86_32; then
|
||||
elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog "must be set beforehand"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use abi_x86_64; then
|
||||
elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
|
||||
elog "must be set beforehand"
|
||||
fi
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -47,6 +47,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -118,20 +120,16 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if use abi_x86_32; then
|
||||
elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog "must be set beforehand"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use abi_x86_64; then
|
||||
elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
|
||||
elog "must be set beforehand"
|
||||
fi
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -46,6 +46,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -117,20 +119,16 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if use abi_x86_32; then
|
||||
elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog "must be set beforehand"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use abi_x86_64; then
|
||||
elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
|
||||
elog "must be set beforehand"
|
||||
fi
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -46,6 +46,8 @@ QA_PREBUILT="
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
if use abi_x86_64 ; then
|
||||
mkdir "${S}/${PN}-amd64" || die
|
||||
cd "${S}/${PN}-amd64" || die
|
||||
@@ -117,20 +119,16 @@ src_install() {
|
||||
insinto /usr/share/vulkan/icd.d
|
||||
doins "${S}"/"${PN}"-i386/opt/amdgpu-pro/etc/vulkan/icd.d/amd_pro_icd32.json
|
||||
fi
|
||||
|
||||
# AMDGPU-PRO & RADV Vulkan prefix
|
||||
dobin "${FILESDIR}/vk_pro"
|
||||
dobin "${FILESDIR}/vk_radv"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
if use abi_x86_32; then
|
||||
elog "To run a 32bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog "must be set beforehand"
|
||||
elog
|
||||
fi
|
||||
|
||||
if use abi_x86_64; then
|
||||
elog "To run a 64bit program using the amdgpu-pro vulkan driver, the environment variable"
|
||||
elog " VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json"
|
||||
elog "must be set beforehand"
|
||||
fi
|
||||
elog "To execute programs with the amdgpu-pro-vulkan driver:"
|
||||
elog " - Use the `vk_pro` wrapper script: e.g. 'vk_pro vkcube'"
|
||||
elog " - Define the following environment variable: "
|
||||
elog " VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json:/usr/share/vulkan/icd.d/amd_pro_icd32.json"
|
||||
elog
|
||||
}
|
||||
2
media-libs/amdgpu-pro-vulkan/files/vk_pro
Normal file
2
media-libs/amdgpu-pro-vulkan/files/vk_pro
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
VK_DRIVER_FILES="/usr/share/vulkan/icd.d/amd_pro_icd32.json:/usr/share/vulkan/icd.d/amd_pro_icd64.json" "$@"
|
||||
2
media-libs/amdgpu-pro-vulkan/files/vk_radv
Normal file
2
media-libs/amdgpu-pro-vulkan/files/vk_radv
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
VK_DRIVER_FILES="/usr/share/vulkan/icd.d/radeon_icd.i686.json:/usr/share/vulkan/icd.d/radeon_icd.x86_64.json" "$@"
|
||||
Reference in New Issue
Block a user