Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AKapo3
Beginner
227 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
AKapo3
Beginner
227 Views

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

AKapo3
Beginner
227 Views

.

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