0

I am trying to use vulkan on raspberry pi 3 A+ (32-bit, Cortex-A53).

Raspberry OS:

pi@pi:~/Downloads/mesa_vulkan $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian

I run this code on raspberry:

#include <vulkan/vulkan.h>

int main(void)
{

VkInstanceCreateInfo createInfo{};
createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
VkInstance instance;

VkResult result = vkCreateInstance(&createInfo, nullptr, &instance);

}

with these arguments:

g++ main.cpp -I ./VulkanFiles/ -L./VulkanFiles -lvulkan_radeon -lVkLayer_MESA_overlay -o ./CompiledFiles/main.out

where I have my vulkan header files in VulkanFiles/Vulkan

And I get:

in function `main':
main.cpp:(.text+0x38): undefined reference to `vkCreateInstance'

What I am unsure of, is if I use the correct library file(s). I use libvulkan_radeon.so which was downloaded using sudo apt install mesa-vulkan-drivers, as I saw in this tutorial (So I didnt compile the library on my own)

vulkan raspberry

  1. Are libvulkan_radeon.so and libVkLayer_MESA_overlay.so the only library files I need to compile my main.cpp?
  2. Where is vkCreateInstance() function stored? Maybe I am missing some libraries?|
  • Did you follow the Linux setup instructions? https://vulkan-tutorial.com/Development_environment You also need `sudo apt install libvulkan-dev` and possibly some other packages. – jiveturkey May 15 '23 at 13:53
  • @jiveturkey I have not. Will check it, thanks. – Christianidis Vasileios May 15 '23 at 13:58
  • A raspberry pi will very likely *not* have a radeon (AMD) video card. I also don't know if the vendor (Broadcam) actually ships a Vulkan driver. Without it you will be limited to doing stuff on the CPU. – Botje May 15 '23 at 14:08
  • @Botje is correct. Unless you're targeting different hardware. Anyway, that dev environment page shows you how to test if your hardware supports it. – jiveturkey May 15 '23 at 14:18

0 Answers0