mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
vk/x11: Allow for the client querying the size of the format properties
This commit is contained in:
parent
bba767a9af
commit
682eb9489d
1 changed files with 8 additions and 1 deletions
|
|
@ -48,10 +48,17 @@ VkResult anv_GetDisplayInfoWSI(
|
|||
switch (infoType) {
|
||||
case VK_DISPLAY_INFO_TYPE_FORMAT_PROPERTIES_WSI:
|
||||
size = sizeof(properties[0]) * ARRAY_SIZE(formats);
|
||||
if (pData && *pDataSize < size)
|
||||
|
||||
if (pData == NULL) {
|
||||
*pDataSize = size;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
if (*pDataSize < size)
|
||||
return vk_error(VK_ERROR_INVALID_VALUE);
|
||||
|
||||
*pDataSize = size;
|
||||
|
||||
for (uint32_t i = 0; i < ARRAY_SIZE(formats); i++)
|
||||
properties[i].swapChainFormat = formats[i];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue