summaryrefslogtreecommitdiff
path: root/icd
diff options
context:
space:
mode:
authorScott.Marsland <Scott.Marsland@imgtec.com>2023-05-16 14:40:44 +0100
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>2023-05-19 13:55:58 -0600
commitb3b4e2aff6afebf8b6eba80c9a0598b03d09e034 (patch)
treef7deb537e0fbaba91b5a8ebde0c6c503fd5bb9a3 /icd
parentfec27a3f6e3bae96a8f3e784d6d643afb41989d6 (diff)
downloadVulkan-Tools-b3b4e2aff6afebf8b6eba80c9a0598b03d09e034.tar.gz
Vulkan-Tools-b3b4e2aff6afebf8b6eba80c9a0598b03d09e034.tar.bz2
Vulkan-Tools-b3b4e2aff6afebf8b6eba80c9a0598b03d09e034.zip
mock: Fix sparse image format properties 2 queries
Fix vkGetPhysicalDeviceSparseImageFormatProperties2 and vkGetPhysicalDeviceSparseImageFormatProperties2KHR queries when pProperties is null.
Diffstat (limited to 'icd')
-rw-r--r--icd/generated/mock_icd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/icd/generated/mock_icd.cpp b/icd/generated/mock_icd.cpp
index 8c193180..8457707d 100644
--- a/icd/generated/mock_icd.cpp
+++ b/icd/generated/mock_icd.cpp
@@ -3226,7 +3226,11 @@ static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2K
uint32_t* pPropertyCount,
VkSparseImageFormatProperties2* pProperties)
{
- 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);
+ }
}