Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
84 Views

vkGetPhysicalDeviceSurfaceFormatsKHR doesn't fill format count correctly

As per Vulkan spec, vkGetPhysicalDeviceSurfaceFormatsKHR should fill pSurfaceFormatCount as follows:

Otherwise, pSurfaceFormatCount must point to a variable set by the user to the number of elements in the pSurfaceFormats array, and on return the variable is overwritten with the number of structures actually written to pSurfaceFormats.

However, this code:

VkSurfaceFormatKHR formats[16];
uint32_t formatCount = sizeof(formats) / sizeof(formats[0]);
VK_CHECK(vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, &formatCount, formats));
 
Leaves formatCount as 16 after vkGetPhysicalDeviceSurfaceFormatsKHR successfully returns (and fills 2 values in the formats buffer).
 
This happens on Windows 10, 24.20.100.6286 graphics driver as reported by dxdiag
0 Kudos
3 Replies
Highlighted
Beginner
84 Views

This bug also occurs with vkGetSwapchainImagesKHR, and possibly other swapchain functions?

0 Kudos
Highlighted
Beginner
84 Views

.

0 Kudos
Highlighted
84 Views

Hello,

We released a new graphics driver (25.20.100.6444) yesterday (11/28) and it has the fix for your issue. You can get details on the driver here: https://downloadcenter.intel.com/download/28139

 

0 Kudos