mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
nvk: Unconditionally zero image format properties
It seems like this shouldn't be neded but some of the tests complain if we don't because they call vkGetPhysicalDeviceImageFormatProperties() and vkGetPhysicalDeviceImageFormatProperties2() and compare if they return identical results even if they return error. Zero is the reasonable thing to do if you don't support a format anyway because then it's a maximum extent, sample count, etc. of zero. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
cf76c3d17c
commit
0e284f71e1
1 changed files with 4 additions and 0 deletions
|
|
@ -83,6 +83,10 @@ nvk_GetPhysicalDeviceImageFormatProperties2(
|
|||
{
|
||||
VK_FROM_HANDLE(nvk_physical_device, pdevice, physicalDevice);
|
||||
|
||||
/* Initialize to zero in case we return VK_ERROR_FORMAT_NOT_SUPPORTED */
|
||||
memset(&pImageFormatProperties->imageFormatProperties, 0,
|
||||
sizeof(pImageFormatProperties->imageFormatProperties));
|
||||
|
||||
VkFormatFeatureFlags2KHR features =
|
||||
nvk_get_image_format_features(pdevice, pImageFormatInfo->format,
|
||||
pImageFormatInfo->tiling);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue