diff options
| author | spencer-lunarg <spencer@lunarg.com> | 2023-12-11 20:55:39 +0900 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2023-12-11 09:37:31 -0700 |
| commit | d39a39c462f05e4bf649ebd97b6e4b4de982242d (patch) | |
| tree | 2f3e6dd7c649fad220ae877a628151c7e456af7b /scripts | |
| parent | 7e75f4d389799129b79f90d1401f15f511796dbd (diff) | |
| download | usermoji-d39a39c462f05e4bf649ebd97b6e4b4de982242d.tar.xz | |
icd: Add basic VkDisplayKHR support
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mock_icd_generator.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 15103fb5..84c7c72d 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -45,8 +45,10 @@ CUSTOM_C_INTERCEPTS = { ''', 'vkDestroyInstance': ''' if (instance) { - for (const auto physical_device : physical_device_map.at(instance)) + for (const auto physical_device : physical_device_map.at(instance)) { + display_map.erase(physical_device); DestroyDispObjHandle((void*)physical_device); + } physical_device_map.erase(instance); DestroyDispObjHandle((void*)instance); } @@ -1090,6 +1092,16 @@ CUSTOM_C_INTERCEPTS = { } return VK_SUCCESS; ''', +'vkGetPhysicalDeviceDisplayPropertiesKHR': ''' + if (!pProperties) { + *pPropertyCount = 1; + } else { + unique_lock_t lock(global_lock); + pProperties[0].display = (VkDisplayKHR)global_unique_handle++; + display_map[physicalDevice].insert(pProperties[0].display); + } + return VK_SUCCESS; +''', } # MockICDGeneratorOptions - subclass of GeneratorOptions. |
