Package Details: vkdevicechooser 1.1-1

Git Clone URL: https://aur.archlinux.org/vkdevicechooser.git (read-only, click to copy)
Package Base: vkdevicechooser
Description: Vulkan layer to force a specific physical GPU device to be used
Upstream URL: https://github.com/jiriks74/vkdevicechooser
Licenses: MIT
Conflicts: vkdevicechooser-git
Submitter: Vorpal
Maintainer: jiriks74
Last Packager: jiriks74
Votes: 6
Popularity: 0.001142
First Submitted: 2019-12-16 15:53 (UTC)
Last Updated: 2023-11-09 00:25 (UTC)

Latest Comments

jiriks74 commented on 2023-11-08 20:21 (UTC)

Hello, there were some changes to the Vulkan-ValidationLayers upstream moving the headder files to Vulkan-Utility-Libraries. I created a patch that makes it work with the changes and I've created a Github repository where I added those changes.

I created a gist for this patch as it's a bit longer and I don't want to post such a long comment here.

The-Corrupted commented on 2023-08-12 00:59 (UTC) (edited on 2023-08-12 01:48 (UTC) by The-Corrupted)

This no longer builds. The vulkan_layer_dispatch.h file has been moved so it's under vulkan/generated/vk_layer_dispatch_table.h now. A patch needs to be applied to get this building again. The contents of the vulkan-headers.patch file I used are below:

diff --unified --recursive --text vkdevicechooser-1.0-old/layer.cpp vkdevicechooser-1.0-new/layer.cpp
--- vkdevicechooser-1.0-old/layer.cpp   2020-06-14 01:20:54.000000000 -0700
+++ vkdevicechooser-1.0-new/layer.cpp   2023-08-11 17:32:37.627852942 -0700
@@ -1,6 +1,6 @@
 #include "vulkan/vulkan.h"
 #include "vulkan/vk_layer.h"
-#include "vulkan/vk_layer_dispatch_table.h"
+#include "vulkan/generated/vk_layer_dispatch_table.h"

 #include <cstdio>
 #include <cstdlib>
diff --unified --recursive --text vkdevicechooser-1.0-old/meson.build vkdevicechooser-1.0-new/meson.build
--- vkdevicechooser-1.0-old/meson.build 2020-06-14 01:20:54.000000000 -0700
+++ vkdevicechooser-1.0-new/meson.build 2023-08-11 17:32:24.238056871 -0700
@@ -13,8 +13,8 @@
 if not cpp.has_header('vulkan/vk_layer.h')
     error('Vulkan development files not present (vulkan/vk_layer.h)')
 endif
-if not cpp.has_header('vulkan/vk_layer_dispatch_table.h')
-    error('Vulkan development files not present (vulkan/vk_layer_dispatch_table.h)')
+if not cpp.has_header('vulkan/generated/vk_layer_dispatch_table.h')
+    error('Vulkan development files not present (vulkan/generated/vk_layer_dispatch_table.h)')
 endif

 libdir = get_option('libdir')

The version also needs to be bumped otherwise vulkan complains. version.patch:

diff --unified --recursive --text vkdevicechooser-1.0/vkdevicechooser.json vkdevicechooser-1.0-new/vkdevicechooser.json
--- vkdevicechooser-1.0/vkdevicechooser.json    2020-06-14 01:20:54.000000000 -0700
+++ vkdevicechooser-1.0-new/vkdevicechooser.json    2023-08-11 18:24:50.723865246 -0700
@@ -4,7 +4,7 @@
         "name": "VK_LAYER_AEJS_DeviceChooserLayer",
         "type": "GLOBAL",
         "library_path": "libvkdevicechooser.so",
-        "api_version": "1.2.131",
+        "api_version": "1.3",
         "implementation_version": "1",
         "description": "Device chooser layer",
         "functions": {

stas-t commented on 2020-09-07 19:11 (UTC)

@Vorpal: here is the patch to keep PKGBUILD up to date:

diff --git a/PKGBUILD b/PKGBUILD
index 795cb19..7b6ec82 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,24 @@
 # Maintainer: Vorpal <vorpal@riseup.net>
 pkgname=vkdevicechooser
-pkgver=1
+pkgver=1.0
 pkgrel=1
 pkgdesc="Vulkan layer to force a specific physical GPU device to be used"
 arch=('x86_64')
 url="https://github.com/aejsmith/vkdevicechooser"
 license=('MIT')
+depends=('vulkan-icd-loader')
+makedepends=('git' 'vulkan-headers' 'vulkan-validation-layers' 'meson' 'ninja')
 source=(https://github.com/aejsmith/vkdevicechooser/archive/master.zip)
-md5sums=('22df9532f1f89855a0db8ad068ba0145')
+md5sums=('0f87f5ba56076f16d56a4c0b008e5763')

 build() {
   cd "${pkgname}-master"
-  make CXXFLAGS="$CXXFLAGS"
+  meson --prefix=/usr build
+  ninja -C build
 }

 package() {
   cd "${pkgname}-master"
-  make install DESTDIR="${HOME}"
+  echo "pkgdir $pkgdir"
+  DESTDIR="$pkgdir" ninja -C build install
 }