Various improvements to check-vulkan
-
check-vulkan: zero-initialize the VkXcbSurfaceCreateInfoKHR variable
If it's not zero-initialized, it could lead to a SEGV when we try to create the XCB surface.
-
check-vulkan: Convert the file from C++ to C
Our entire codebase is in C with the only exception for check-vulkan and check-gl. They were coded in C++ because they were based on pre-existing codes.
Converting check-vulkan in C allows us to conform it to the rest of our codebase and also it will be easier to expand its functionalities, like for example as outlined in #50 (closed).
-
check-vulkan: Improve error messages
-
check-vulkan: Print in output JSON objects with GPUs info
When we call the check-vulkan helper we will have in output information about all the available physical GPUs and also a separate JSON object that tells us if the GPU 0 is able to draw the triangle test.
I decided to split my work toward #50 (closed) in two. This first MR contains most of the changes to check-vulkan
, but it still only checks the GPU 0 and returns zero, if the GPU is able to draw a triangle.
Then it will follow a second MR to leverage the new info printed by check-vulkan
, and it will also make check-vulkan
test all the available GPUs.
/cc @smcv I'm sorry but the conversion to C drastically changed the file. I was not expecting so many changes.