I am following Learning Vulkan by Parminder Singh for learning graphics programming using Vulkan API. I have followed the guide for the device handshake correctly and the compilation is done. Only, it returns a segmentation fault at runtime. After debugging line by line, i have determined that the exact line at which this error occurs is in the Vulkan Application class’s member function where i call the vkEnumeratePhysicalDevice function :
82 VkResult result = vkEnumeratePhysicalDevices(instanceObj.instance, &gpuDeviceCount, NULL);
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f7fdfb in ?? () from /lib/x86_64-linux-gnu/libvulkan.so.1
I am using Vulkan 1.2.154.0, my system is Ubuntu 20.04, and the graphics card installed on my sydtem is Intel UHD Graphics 630
I can’t find any errors in the syntax or any other errors in the code, so I don’t know exctly how to rectify this. could use some help
Looks like it is picking up 32bit drivers and you are probably on a 64bit system or at least running a 64bit vkvia binary. I don’t know why that happens or how to fix it. You could check to only have the drivers that match your architecture installed, that way vkvia should not accidentally try to pick the wrong ones.