Yours3lf / rpi-vk-driver

VK driver for the Raspberry Pi (Broadcom Videocore IV)
MIT License
1.23k stars 70 forks source link

Should vkcube and rpi-vk-driver tests work #14

Closed juanitotc closed 4 years ago

juanitotc commented 4 years ago

vulkaninfo from vulkan-tools seems to work, but not vkcube:

$ vkcube
vkEnumerateInstanceExtensionProperties failed to find the VK_KHR_xcb_surface extension.

Do you have a compatible Vulkan installable client driver (ICD) installed?
Please look at the Getting Started guide for additional information.

$ cat /usr/local/share/vulkan/icd.d/rpi-vk-driver.json
{
        "file_format_version": "1.0.0",
        "ICD": {
                "library_path": "/usr/local/lib/librpi-vk-driver.so",
                "api_version": "1.1.0"
        }
}

$ ldd /usr/local/lib/librpi-vk-driver.so
        linux-vdso.so.1 (0x7ecc7000)
        libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x76e6f000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x76e45000)
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x76e14000)
        libz.so.1 => /usr/lib/libz.so.1 (0x76dff000)
        libc.so.6 => /lib/libc.so.6 (0x76cbd000)
        libm.so.6 => /lib/libm.so.6 (0x76c50000)
        /lib/ld-linux-armhf.so.3 (0x76ed0000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x76c20000)

Also, most of the rpi-vk-driver tests seem to fail in the same way:

$ ./clearTest
supported extensions:
        VK_KHR_surface
        VK_KHR_display
        VK_EXT_debug_report
        VK_EXT_debug_utils
created vulkan instance
physical device with vulkan support found
physical device supports version 1.1.0
Enumerated displays
Display ID 0
Display name 1280x1024
Display width 380
Display height 310
Display horizontal resolution 1280
Display vertical resolution 1024
created window surface
physical device supports swap chains
physical device has 1 queue families
queue family #0 supports graphics
queue family #0 supports presentation
created logical device
acquired graphics and presentation queues
created semaphores
using 2 images for swap chain
created swap chain
acquired swap chain images
created command pool for presentation queue family
allocated presentation command buffers
Created a render pass
Frame buffers created
Vertex buffer created
Graphics pipeline created
recorded command buffer for image 0
recorded command buffer for image 1
acquired image
submitted draw command buffer
cannot set CRTC for connector 29: Permission denied
submitted presentation command buffer
[hung]
Yours3lf commented 4 years ago

Vkcube doesn’t work because it tries to use an X surface. This driver does not support X or Wayland at this point, it uses direct modesetting to draw to the whole screen. That requires you to be able to switch modes which require an environment where there’s no exclusive hold on it thus the need to boot to console. So if you boot to console the tests should work fine.

juanitotc commented 4 years ago

Ah - thanks for the explanation, the tests seem to work from the console prompt.