diff options
| author | Scott.Marsland <Scott.Marsland@imgtec.com> | 2023-05-16 14:40:44 +0100 |
|---|---|---|
| committer | Juan Ramos <114601453+juan-lunarg@users.noreply.github.com> | 2023-05-19 13:55:58 -0600 |
| commit | b3b4e2aff6afebf8b6eba80c9a0598b03d09e034 (patch) | |
| tree | f7deb537e0fbaba91b5a8ebde0c6c503fd5bb9a3 /scripts | |
| parent | fec27a3f6e3bae96a8f3e784d6d643afb41989d6 (diff) | |
| download | usermoji-b3b4e2aff6afebf8b6eba80c9a0598b03d09e034.tar.xz | |
mock: Fix sparse image format properties 2 queries
Fix vkGetPhysicalDeviceSparseImageFormatProperties2 and
vkGetPhysicalDeviceSparseImageFormatProperties2KHR queries when
pProperties is null.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 22b7d1ff..363a4533 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -892,7 +892,11 @@ CUSTOM_C_INTERCEPTS = { } ''', 'vkGetPhysicalDeviceSparseImageFormatProperties2KHR': ''' - GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, pFormatInfo->format, pFormatInfo->type, pFormatInfo->samples, pFormatInfo->usage, pFormatInfo->tiling, pPropertyCount, &pProperties->properties); + if (pPropertyCount && pProperties) { + GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, pFormatInfo->format, pFormatInfo->type, pFormatInfo->samples, pFormatInfo->usage, pFormatInfo->tiling, pPropertyCount, &pProperties->properties); + } else { + GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, pFormatInfo->format, pFormatInfo->type, pFormatInfo->samples, pFormatInfo->usage, pFormatInfo->tiling, pPropertyCount, nullptr); + } ''', 'vkGetPhysicalDeviceProperties': ''' pProperties->apiVersion = VK_HEADER_VERSION_COMPLETE; |
