Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance and optimization
18025 Discussions

vkGetPhysicalDeviceSurfaceFormatsKHR doesn't fill format count correctly

AKapo3
Beginner
654 Views

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
AKapo3
Beginner
654 Views

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

AKapo3
Beginner
655 Views

.

Michael_C_Intel2
Employee
655 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

 

Reply