vkdt and raspberry pi5

Hello, I just got a new Raspberry PI5 (with Vulkan 1.2), so I am going to compile vkdt.
First try, I get this error

...
/bin/sh: 1: cd: can't cd to src/pipe/modules/i-raw/rawspeed
...
pipe/modules/i-vid/main.c:474:42: error: no member named 'frame_num' in 'struct AVCodecContext'; did you mean 'frame_number'?
    if(mod->graph->frame + 1 != d->vctx->frame_num) // zero vs 1 based
                                         ^~~~~~~~~
                                         frame_number
/usr/include/aarch64-linux-gnu/libavcodec/avcodec.h:1037:9: note: 'frame_number' declared here
    int frame_number;
        ^
1 error generated.

Did you do a recursive git clone?

that’s an ffmpeg compile problem. they renamed frame_num to frame_number or the other way around. you need ffmpeg 6+ or you might want to disable the i-vid module in your bin/config.mk:

VKDT_USE_FFMPEG=0
export VKDT_USE_FFMPEG

re: recursive clone: i only use one more submodule for imgui, but looking into replacing that by inline nuklear… might not need submodules any more at all at some point.

2 Likes

Hello, I choose to disable i-vid
after compilation, I still have some errors but vkdt can be lauched
The issue is the compilation of rawspeed (it works for dt)
It said we need clang 16+ (but it’s installed)

probably revert to older rawspeed or use the rust backend instead.

1 Like

hello,
with new nuklear gui, I got these errors
any clue?

vulkaninfo 1.3.239

cd pipe/modules/i-raw/rawloader-c; cargo build --release
   Compiling rawloader-clib v0.1.0 (/home/olivier/vkdt/src/pipe/modules/i-raw/rawloader-c)
error[E0308]: mismatched types
  --> lib.rs:57:14
   |
57 |     dst[i] = c as i8;
   |     ------   ^^^^^^^ expected `u8`, found `i8`

clang -Wall -pipe -I. -D_GNU_SOURCE -std=c11 -fPIC -g -gdwarf-2 -ggdb3 -O0 -DQVK_ENABLE_VALIDATION -DDEBUG_MARKERS   -c gui/render.c -o gui/render.o
In file included from gui/render.c:3:
In file included from gui/nk.h:12:
gui/nuklear_glfw_vulkan.h:477:14: error: use of undeclared identifier 'gui_shd_gui_vert_spv'
        dev, gui_shd_gui_vert_spv,
             ^
gui/nuklear_glfw_vulkan.h:478:9: error: use of undeclared identifier 'gui_shd_gui_vert_spv_len'
        gui_shd_gui_vert_spv_len, VK_SHADER_STAGE_VERTEX_BIT);
        ^
gui/nuklear_glfw_vulkan.h:480:14: error: use of undeclared identifier 'gui_shd_gui_frag_spv'
        dev, gui_shd_gui_frag_spv,
             ^
gui/nuklear_glfw_vulkan.h:481:9: error: use of undeclared identifier 'gui_shd_gui_frag_spv_len'
        gui_shd_gui_frag_spv_len, VK_SHADER_STAGE_FRAGMENT_BIT);
        ^
4 errors generated.

the second one: install xxd.

the first issue… are you manually cd-ing into that directory? the build process should do that for you, and also grab exactly the same version of all rust modules, via Cargo.lock. which version of rustc are you using? seem to have no issues with

rustc 1.84.0 (9fc6b4312 2025-01-07) (Arch Linux rust 1:1.84.0-1)

thanks a lot for your feedback

yes this version

no, the error disappear with ā€˜make debug’

xxd 2:9.0.1378-2

no change; same errors

???

did you make clean after installing xxd? possible that now you have empty files with up to date timestamp…

after make clean

Still

cd pipe/modules/i-raw/rawloader-c; cargo build --release
   Compiling rawloader-clib v0.1.0 (/home/olivier/vkdt/src/pipe/modules/i-raw/rawloader-c)
error[E0308]: mismatched types
  --> lib.rs:57:14
   |
57 |     dst[i] = c as i8;
   |     ------   ^^^^^^^ expected `u8`, found `i8`

you 're right
issue is cargo
I’m looking for…

cargo build crashes also at the same ligne

hm, no idea. maybe on arm a c char is unsigned? can you pull and try again?

thank you very much for your help
compil ok
run ko

[ERR] error VK_ERROR_LAYER_NOT_PRESENT executing vkCreateInstance!
[ERR] did you install the vulkan validation layer package?
[ERR] init vulkan failed
[ERR] failed to init gui/swapchain

I will be away from my pi5 until Monday evening, I will not be able to look at the run problem during the long weekend.
Thanks again

hello,
I’m back in town
I solved some issues with vulkan setup , but I got this error

[qvk] picked device 0 without ray tracing and without float atomics and without coopmat support
[qvk] validation layer: loader_validate_device_extensions: Device extension VK_EXT_descriptor_indexing not supported by selected physical device or enabled layers.
vkdt: qvk/qvk.c:105: VkBool32 vk_debug_callback(VkDebugUtilsMessageSeverityFlagBitsEXT, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *, void *): Assertion `0' failed.

I tried to force name of gpu using the data found with ā€˜vulkaninfo’

strqvk/device_name:V3D 7.1.7
intqvk/device_id:0x55701c33

stupid question. does the rpi5 even a vulkan driver? is it any useful for vkdt?

or are you doing Jeff Geerling style eGPU with your rpi5?

It seems recent PIs have Vulkan support of some sort:

glmark2 2023.01 score : 388
vkmark 2017.08 score : 1689

I have been interested for some time in these small ARM machines with gpu like the pi5. I bet that these configurations will become more and more powerful

yes, it supports vk 1.2, but not the descriptor indexing extension. this is something that is needed so moltenvk can work around some macintosh specific limitations, and also for the textures in quake, iirc. i suppose you can try and disable it in the code. i let it in there hardcoded because i figured vkdt wouldn’t be much fun on machines that don’t support this level of vulkan.

maybe like comment out this line vkdt/src/qvk/qvk.c at master Ā· hanatos/vkdt Ā· GitHub

and this: vkdt/src/qvk/qvk.c at master Ā· hanatos/vkdt Ā· GitHub

and decrement the numbers here: vkdt/src/qvk/qvk.c at master Ā· hanatos/vkdt Ā· GitHub
to read int len = (qvk.raytracing_supported ? 6 : 0);

but i’ll be surprised if this works.

i’ll agree that arm + GPU will be interesting, i’m curious about what nvidia kinda announced there.

for your ā€œGPUā€ you will definitely need to reduce the rendering resolution, like set intgui/lod:3 in .config/vkdt/config.rc or so.

thank you very much for your advices, I’m going to test
just some remarks :
-vulkan instance version : 1.3.239
-apiVersion : 1.2.255
when you said it supports vk1.2, you mean apiVersion or vulkan instance version?