vkcube
vkcube copied to clipboard
cannot find vulkan_intel.h for Ubuntu
Is this still needed? Also glslc is a bit of a mystery also.
We should probably drop the intel extension. Same stuff can be implemented with KHR.
I guess we should also replace glslc by glslang.
See https://github.com/krh/vkcube/pull/47 for glslang.
Having this issue too and it took me a while to realize this as the program appeared to work but failing to initialize KMS (so I went looking in all the wrong places) — turns out that if the vulkan_intel.h header is not found, init_kms
is a stub that silently fails:
https://github.com/krh/vkcube/blob/8261e90c8b2584155fa7b993048a4b18eea921ce/main.c#L674-L678
What would have saved me a lot of time with a helpful error message like "KMS not available: vulkan_intel is disabled" [Edit] Suggested temporary remedy: https://github.com/krh/vkcube/pull/60
In addition, the program spits out a broken PNG: (likely from the segfault)
$ sudo ./build/vkcube
failed to initialize kms, falling back to headless
3 physical devices
vendor id 10de, device name NVIDIA GeForce RTX 4070 Ti
writing first frame to ./cube.png
Segmentation fault
$
Image:
System: x86_64, Ubuntu 22.04.1, Linux 5.19.0
How I built it:
sudo apt install -y \
meson \
libdrm-dev \
libpng-dev \
libvulkan-dev \
glslang-tools \
ninja-build
git clone https://chromium.googlesource.com/chromiumos/platform/minigbm
cd minigbm
$EDITOR Makefile # add -DGBM_I915 to CPPFLAGS
make DESTDIR=install -j32 install
sed -E -i -e "s@^prefix=.+@prefix=$PWD/install/usr@" \
install/usr/lib/pkgconfig/gbm.pc
cd ..
git clone https://github.com/krh/vkcube.git
cd vkcube
PKG_CONFIG_PATH="$PWD/../minigbm/install/usr/lib/pkgconfig:$(pkg-config --variable pc_path pkg-config)" \
meson setup ./build
ninja -C build
based on the very brief instructions in main.c:
https://github.com/krh/vkcube/blob/8261e90c8b2584155fa7b993048a4b18eea921ce/main.c#L29-L35
JFYI, I have implemented baremetal KMS support, see #61