diff options
| author | Artem Kharytoniuk <artem@lunarg.com> | 2024-04-01 16:28:41 +0200 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2024-04-01 12:29:08 -0500 |
| commit | c5da01ee0af9766c2992d6757e8f31ef50117b09 (patch) | |
| tree | 82868a75d9a61d8656fcfb020c228bc6d6ec07a4 | |
| parent | 3617af28811d9cc15fc2bb5b4a6565cd19b08089 (diff) | |
| download | usermoji-c5da01ee0af9766c2992d6757e8f31ef50117b09.tar.xz | |
icd: Add external memory properties
| -rw-r--r-- | icd/generated/function_definitions.h | 5 | ||||
| -rw-r--r-- | scripts/mock_icd_generator.py | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/icd/generated/function_definitions.h b/icd/generated/function_definitions.h index e05e5ab4..64682690 100644 --- a/icd/generated/function_definitions.h +++ b/icd/generated/function_definitions.h @@ -3586,10 +3586,9 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR { auto *external_image_prop = lvl_find_mod_in_chain<VkExternalImageFormatProperties>(pImageFormatProperties->pNext); auto *external_image_format = lvl_find_in_chain<VkPhysicalDeviceExternalImageFormatInfo>(pImageFormatInfo->pNext); - if (external_image_prop && external_image_format && external_image_format->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) { + if (external_image_prop && external_image_format) { external_image_prop->externalMemoryProperties.externalMemoryFeatures = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT; external_image_prop->externalMemoryProperties.compatibleHandleTypes = external_image_format->handleType; - external_image_prop->externalMemoryProperties.compatibleHandleTypes = external_image_format->handleType; } GetPhysicalDeviceImageFormatProperties(physicalDevice, pImageFormatInfo->format, pImageFormatInfo->type, pImageFormatInfo->tiling, pImageFormatInfo->usage, pImageFormatInfo->flags, &pImageFormatProperties->imageFormatProperties); @@ -3757,7 +3756,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR( HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { -//Not a CREATE or DESTROY function + pMemoryWin32HandleProperties->memoryTypeBits = 0xFFFF; return VK_SUCCESS; } #endif /* VK_USE_PLATFORM_WIN32_KHR */ diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 5f333f72..55b37124 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -531,10 +531,9 @@ CUSTOM_C_INTERCEPTS = { 'vkGetPhysicalDeviceImageFormatProperties2KHR': ''' auto *external_image_prop = lvl_find_mod_in_chain<VkExternalImageFormatProperties>(pImageFormatProperties->pNext); auto *external_image_format = lvl_find_in_chain<VkPhysicalDeviceExternalImageFormatInfo>(pImageFormatInfo->pNext); - if (external_image_prop && external_image_format && external_image_format->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) { + if (external_image_prop && external_image_format) { external_image_prop->externalMemoryProperties.externalMemoryFeatures = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT | VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT; external_image_prop->externalMemoryProperties.compatibleHandleTypes = external_image_format->handleType; - external_image_prop->externalMemoryProperties.compatibleHandleTypes = external_image_format->handleType; } GetPhysicalDeviceImageFormatProperties(physicalDevice, pImageFormatInfo->format, pImageFormatInfo->type, pImageFormatInfo->tiling, pImageFormatInfo->usage, pImageFormatInfo->flags, &pImageFormatProperties->imageFormatProperties); @@ -1667,6 +1666,10 @@ CUSTOM_C_INTERCEPTS = { } return VK_SUCCESS; ''', +'vkGetMemoryWin32HandlePropertiesKHR': ''' + pMemoryWin32HandleProperties->memoryTypeBits = 0xFFFF; + return VK_SUCCESS; +''' } # MockICDGeneratorOptions - subclass of GeneratorOptions. |
