Igalia/vkrunner

VkFormat error

jaebaek opened this issue · 3 comments

init_vk() function in vr-window.c calls vr_vk.vkGetPhysicalDeviceFormatProperties()
and checks format_properties (i.e., format_properties.optimalTilingFeatures and format_properties.linearTilingFeatures).
If both format_properties.optimalTilingFeatures and format_properties.linearTilingFeatures are not correct, it fails.

Since some VkFormat are not supposed to support both
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_BLIT_SRC_BIT
and VK_FORMAT_FEATURE_BLIT_DST_BIT,
it may fail in some devices (or drivers).

Why don't we just give warning message here?
(or we can check it based on vulkan spec)

bpeel commented

Thanks for the bug report. The blit to a linear buffer is just used to implement the equivalent of a glReadPixels for the probe commands. It’s true that the nvidia driver doesn’t advertise BLIT_DST for linear buffers so vkrunner doesn’t work, even though if you ignore the format properties the blit does seem to work anyway. Looking at it a bit more, it seems that the Vulkan CTS tests use vkCopyImageToBuffer to read the results of the render. Perhaps that is what we should do in VkRunner as well to maximise the number of potential drivers it works on.

bpeel commented

This should hopefully be fixed with this commit (I put the wrong issue number in the commit message :/)

44b6603b60f08d93a56376b5f8

Thanks 👍