felixdoerre / primus_vk

Vulkan GPU-offloading layer
BSD 2-Clause "Simplified" License
229 stars 17 forks source link

[Gentoo compilation] vulkan/vk_layer_dispatch_table.h not found, with vulkan >=1.3.246 (Solved) #91

Closed jaypeche closed 1 year ago

jaypeche commented 1 year ago

Since vulkan >=1.3.246, primus_vk compilation returns :

primus_vk.cpp:7:10: fatal error: vulkan/vk_layer_dispatch_table.h: No such file or directory

Compilation logs here

Header files on /usr/include/vulkan : https://gist.github.com/jaypeche/d43ea291db15d701afcdb516f9da3a65

What's vulkan header needed to compile primus_vk-1.6.2 before vulkan upgrade ?

Thx in advance

jaypeche commented 1 year ago

Header was moved to /usr/include/vulkan/generated Modify header path solve this issue. Fix patch here Ebuild logs : vulkan header fix

felixdoerre commented 1 year ago

I've tracked it down to this change in the vulkan SDK: https://github.com/KhronosGroup/Vulkan-ValidationLayers/commit/ca01a6ef1bb49eb05a99607f69ac7771648780fe

Personally I would favor adding -I/usr/include/vulkan/generated to the makefile here https://github.com/felixdoerre/primus_vk/blob/master/Makefile#L19 (and two lines below), so we stay compatible with both versions.

I've adjusted this on master, you can try if that builds for you.

jaypeche commented 1 year ago

This solution is really better for portability !

Thx

jaypeche commented 1 year ago

{ primus_vk-1.6.3-r1 ] version bump Gentoo update 28 Jul 2023 at https://ftp.pingwho.org/pub/gentoo/ftp/overlay/dbox2-overlay/x11-libs/primus_vk