diff options
| author | Mike Schuchardt <mikes@lunarg.com> | 2023-03-22 09:38:36 -0700 |
|---|---|---|
| committer | Mike Schuchardt <mikes@lunarg.com> | 2023-03-22 12:07:24 -0700 |
| commit | 728c1535dea8d04d4bd37308b3dbd3a0eff9726b (patch) | |
| tree | fc40e2c97cb566d7553da1e926445e8d47286fc2 | |
| parent | f196c8d3cafcaf7e628b7b76a799c940999ee984 (diff) | |
| download | usermoji-728c1535dea8d04d4bd37308b3dbd3a0eff9726b.tar.xz | |
build: Update to header 1.3.244
- Update known-good
- Generate source
| -rw-r--r-- | build-android/vulkan-headers_revision_android | 2 | ||||
| -rw-r--r-- | common/vulkan_wrapper.cpp | 4 | ||||
| -rw-r--r-- | common/vulkan_wrapper.h | 4 | ||||
| -rw-r--r-- | icd/generated/mock_icd.cpp | 17 | ||||
| -rw-r--r-- | icd/generated/mock_icd.h | 13 | ||||
| -rw-r--r-- | icd/generated/vk_typemap_helper.h | 18 | ||||
| -rwxr-xr-x | scripts/generate_vulkan_wrapper.py | 6 | ||||
| -rw-r--r-- | scripts/known_good.json | 4 | ||||
| -rw-r--r-- | scripts/mock_icd_generator.py | 7 |
9 files changed, 72 insertions, 3 deletions
diff --git a/build-android/vulkan-headers_revision_android b/build-android/vulkan-headers_revision_android index 916242a8..01cb7505 100644 --- a/build-android/vulkan-headers_revision_android +++ b/build-android/vulkan-headers_revision_android @@ -1 +1 @@ -v1.3.243 +v1.3.244 diff --git a/common/vulkan_wrapper.cpp b/common/vulkan_wrapper.cpp index 56614d4e..782d4052 100644 --- a/common/vulkan_wrapper.cpp +++ b/common/vulkan_wrapper.cpp @@ -464,6 +464,8 @@ int InitVulkan(void) { reinterpret_cast<PFN_vkGetPipelineExecutableStatisticsKHR>(dlsym(libvulkan, "vkGetPipelineExecutableStatisticsKHR")); vkGetPipelineExecutableInternalRepresentationsKHR = reinterpret_cast<PFN_vkGetPipelineExecutableInternalRepresentationsKHR>( dlsym(libvulkan, "vkGetPipelineExecutableInternalRepresentationsKHR")); + vkMapMemory2KHR = reinterpret_cast<PFN_vkMapMemory2KHR>(dlsym(libvulkan, "vkMapMemory2KHR")); + vkUnmapMemory2KHR = reinterpret_cast<PFN_vkUnmapMemory2KHR>(dlsym(libvulkan, "vkUnmapMemory2KHR")); vkCmdSetEvent2KHR = reinterpret_cast<PFN_vkCmdSetEvent2KHR>(dlsym(libvulkan, "vkCmdSetEvent2KHR")); vkCmdResetEvent2KHR = reinterpret_cast<PFN_vkCmdResetEvent2KHR>(dlsym(libvulkan, "vkCmdResetEvent2KHR")); vkCmdWaitEvents2KHR = reinterpret_cast<PFN_vkCmdWaitEvents2KHR>(dlsym(libvulkan, "vkCmdWaitEvents2KHR")); @@ -903,6 +905,8 @@ PFN_vkDeferredOperationJoinKHR vkDeferredOperationJoinKHR; PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertiesKHR; PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; +PFN_vkMapMemory2KHR vkMapMemory2KHR; +PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR; PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR; PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR; PFN_vkCmdWaitEvents2KHR vkCmdWaitEvents2KHR; diff --git a/common/vulkan_wrapper.h b/common/vulkan_wrapper.h index 8909486a..fe47d433 100644 --- a/common/vulkan_wrapper.h +++ b/common/vulkan_wrapper.h @@ -428,6 +428,10 @@ extern PFN_vkGetPipelineExecutablePropertiesKHR vkGetPipelineExecutablePropertie extern PFN_vkGetPipelineExecutableStatisticsKHR vkGetPipelineExecutableStatisticsKHR; extern PFN_vkGetPipelineExecutableInternalRepresentationsKHR vkGetPipelineExecutableInternalRepresentationsKHR; +// VK_KHR_map_memory2 +extern PFN_vkMapMemory2KHR vkMapMemory2KHR; +extern PFN_vkUnmapMemory2KHR vkUnmapMemory2KHR; + // VK_KHR_synchronization2 extern PFN_vkCmdSetEvent2KHR vkCmdSetEvent2KHR; extern PFN_vkCmdResetEvent2KHR vkCmdResetEvent2KHR; diff --git a/icd/generated/mock_icd.cpp b/icd/generated/mock_icd.cpp index b3bf8136..a10205ba 100644 --- a/icd/generated/mock_icd.cpp +++ b/icd/generated/mock_icd.cpp @@ -3918,6 +3918,23 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentatio } +static VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR( + VkDevice device, + const VkMemoryMapInfoKHR* pMemoryMapInfo, + void** ppData) +{ + return MapMemory(device, pMemoryMapInfo->memory, pMemoryMapInfo->offset, pMemoryMapInfo->size, pMemoryMapInfo->flags, ppData); +} + +static VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR( + VkDevice device, + const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) +{ + UnmapMemory(device, pMemoryUnmapInfo->memory); + return VK_SUCCESS; +} + + diff --git a/icd/generated/mock_icd.h b/icd/generated/mock_icd.h index 14f5c7f8..5c92af70 100644 --- a/icd/generated/mock_icd.h +++ b/icd/generated/mock_icd.h @@ -272,6 +272,7 @@ static const std::unordered_map<std::string, uint32_t> device_extension_map = { {"VK_EXT_extended_dynamic_state", 1}, {"VK_KHR_deferred_host_operations", 4}, {"VK_KHR_pipeline_executable_properties", 1}, + {"VK_KHR_map_memory2", 1}, {"VK_EXT_shader_atomic_float2", 1}, {"VK_EXT_swapchain_maintenance1", 1}, {"VK_EXT_shader_demote_to_helper_invocation", 1}, @@ -2308,6 +2309,16 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentatio VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); +static VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR( + VkDevice device, + const VkMemoryMapInfoKHR* pMemoryMapInfo, + void** ppData); + +static VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR( + VkDevice device, + const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); + + @@ -4545,6 +4556,8 @@ static const std::unordered_map<std::string, void*> name_to_funcptr_map = { {"vkGetPipelineExecutablePropertiesKHR", (void*)GetPipelineExecutablePropertiesKHR}, {"vkGetPipelineExecutableStatisticsKHR", (void*)GetPipelineExecutableStatisticsKHR}, {"vkGetPipelineExecutableInternalRepresentationsKHR", (void*)GetPipelineExecutableInternalRepresentationsKHR}, + {"vkMapMemory2KHR", (void*)MapMemory2KHR}, + {"vkUnmapMemory2KHR", (void*)UnmapMemory2KHR}, #ifdef VK_ENABLE_BETA_EXTENSIONS {"vkCmdEncodeVideoKHR", (void*)CmdEncodeVideoKHR}, #endif diff --git a/icd/generated/vk_typemap_helper.h b/icd/generated/vk_typemap_helper.h index 736adbd6..b425be08 100644 --- a/icd/generated/vk_typemap_helper.h +++ b/icd/generated/vk_typemap_helper.h @@ -2975,6 +2975,24 @@ template <> struct LvlSTypeMap<VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_RE typedef VkPipelineExecutableInternalRepresentationKHR Type; }; +// Map type VkMemoryMapInfoKHR to id VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR +template <> struct LvlTypeMap<VkMemoryMapInfoKHR> { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR; +}; + +template <> struct LvlSTypeMap<VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR> { + typedef VkMemoryMapInfoKHR Type; +}; + +// Map type VkMemoryUnmapInfoKHR to id VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR +template <> struct LvlTypeMap<VkMemoryUnmapInfoKHR> { + static const VkStructureType kSType = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR; +}; + +template <> struct LvlSTypeMap<VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR> { + typedef VkMemoryUnmapInfoKHR Type; +}; + // Map type VkPipelineLibraryCreateInfoKHR to id VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR template <> struct LvlTypeMap<VkPipelineLibraryCreateInfoKHR> { static const VkStructureType kSType = VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR; diff --git a/scripts/generate_vulkan_wrapper.py b/scripts/generate_vulkan_wrapper.py index 9243d9af..da573f2a 100755 --- a/scripts/generate_vulkan_wrapper.py +++ b/scripts/generate_vulkan_wrapper.py @@ -632,6 +632,11 @@ VK_KHR_pipeline_executable_properties = Extension(name='VK_KHR_pipeline_executab Command(name='vkGetPipelineExecutableInternalRepresentationsKHR', dispatch='VkDevice'), ]) +VK_KHR_map_memory2 = Extension(name='VK_KHR_map_memory2', version=1, guard=None, commands=[ + Command(name='vkMapMemory2KHR', dispatch='VkDevice'), + Command(name='vkUnmapMemory2KHR', dispatch='VkDevice'), +]) + VK_KHR_shader_integer_dot_product = Extension(name='VK_KHR_shader_integer_dot_product', version=1, guard=None, commands=[ ]) @@ -1769,6 +1774,7 @@ extensions = [ VK_KHR_buffer_device_address, VK_KHR_deferred_host_operations, VK_KHR_pipeline_executable_properties, + VK_KHR_map_memory2, VK_KHR_shader_integer_dot_product, VK_KHR_pipeline_library, VK_KHR_shader_non_semantic_info, diff --git a/scripts/known_good.json b/scripts/known_good.json index f56c769f..9aeb26ee 100644 --- a/scripts/known_good.json +++ b/scripts/known_good.json @@ -6,7 +6,7 @@ "sub_dir" : "Vulkan-Headers", "build_dir" : "Vulkan-Headers/build", "install_dir" : "Vulkan-Headers/build/install", - "commit": "v1.3.243" + "commit": "v1.3.244" }, { "name" : "MoltenVK", @@ -30,7 +30,7 @@ "sub_dir" : "Vulkan-Loader", "build_dir" : "Vulkan-Loader/build", "install_dir" : "Vulkan-Loader/build/install", - "commit": "v1.3.243", + "commit": "v1.3.244", "deps" : [ { "var_name" : "VULKAN_HEADERS_INSTALL_DIR", diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index b6c460b5..eeef3829 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -1031,6 +1031,9 @@ CUSTOM_C_INTERCEPTS = { *ppData = map_addr; return VK_SUCCESS; ''', +'vkMapMemory2KHR': ''' + return MapMemory(device, pMemoryMapInfo->memory, pMemoryMapInfo->offset, pMemoryMapInfo->size, pMemoryMapInfo->flags, ppData); +''', 'vkUnmapMemory': ''' unique_lock_t lock(global_lock); for (auto map_addr : mapped_memory_map[memory]) { @@ -1038,6 +1041,10 @@ CUSTOM_C_INTERCEPTS = { } mapped_memory_map.erase(memory); ''', +'vkUnmapMemory2KHR': ''' + UnmapMemory(device, pMemoryUnmapInfo->memory); + return VK_SUCCESS; +''', 'vkGetImageSubresourceLayout': ''' // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. *pLayout = VkSubresourceLayout(); // Default constructor zero values. |
