From 02e3d52b817b18315879860cd0774f60c5ca017c Mon Sep 17 00:00:00 2001 From: Mike Schuchardt Date: Thu, 30 Oct 2025 17:29:41 -0700 Subject: [PATCH] build: Update to header 1.4.331 --- CMakeLists.txt | 2 +- loader/generated/vk_layer_dispatch_table.h | 11 ++ loader/generated/vk_loader_extensions.c | 120 ++++++++++++++++++ loader/generated/vk_loader_extensions.h | 3 + loader/loader.rc | 4 +- scripts/known_good.json | 2 +- .../generated/vk_dispatch_table_helper.h | 7 + 7 files changed, 145 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index afed8e2ab..19df6ca14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ # ~~~ cmake_minimum_required(VERSION 3.22.1) -project(VULKAN_LOADER VERSION 1.4.330 LANGUAGES C) +project(VULKAN_LOADER VERSION 1.4.331 LANGUAGES C) option(CODE_COVERAGE "Enable Code Coverage" OFF) if (CODE_COVERAGE) diff --git a/loader/generated/vk_layer_dispatch_table.h b/loader/generated/vk_layer_dispatch_table.h index 2b86d9880..83e24eb4a 100644 --- a/loader/generated/vk_layer_dispatch_table.h +++ b/loader/generated/vk_layer_dispatch_table.h @@ -309,6 +309,9 @@ typedef struct VkLayerInstanceDispatchTable_ { // ---- VK_NV_cooperative_matrix2 extension commands PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; + + // ---- VK_ARM_performance_counters_by_region extension commands + PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM; } VkLayerInstanceDispatchTable; // Device function pointer dispatch table @@ -1145,6 +1148,14 @@ typedef struct VkLayerDispatchTable_ { PFN_vkCmdUpdatePipelineIndirectBufferNV CmdUpdatePipelineIndirectBufferNV; PFN_vkGetPipelineIndirectDeviceAddressNV GetPipelineIndirectDeviceAddressNV; + // ---- VK_OHOS_external_memory extension commands +#if defined(VK_USE_PLATFORM_OHOS) + PFN_vkGetNativeBufferPropertiesOHOS GetNativeBufferPropertiesOHOS; +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) + PFN_vkGetMemoryNativeBufferOHOS GetMemoryNativeBufferOHOS; +#endif // VK_USE_PLATFORM_OHOS + // ---- VK_EXT_extended_dynamic_state3 extension commands PFN_vkCmdSetDepthClampEnableEXT CmdSetDepthClampEnableEXT; PFN_vkCmdSetPolygonModeEXT CmdSetPolygonModeEXT; diff --git a/loader/generated/vk_loader_extensions.c b/loader/generated/vk_loader_extensions.c index bd9c9bfbf..ba82a620e 100644 --- a/loader/generated/vk_loader_extensions.c +++ b/loader/generated/vk_loader_extensions.c @@ -331,6 +331,9 @@ VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_instance* inst, // ---- VK_NV_cooperative_matrix2 extension commands LOOKUP_GIPA(GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV); + // ---- VK_ARM_performance_counters_by_region extension commands + LOOKUP_GIPA(EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM); + #undef LOOKUP_REQUIRED_GIPA #undef LOOKUP_GIPA @@ -1183,6 +1186,14 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo table->CmdUpdatePipelineIndirectBufferNV = (PFN_vkCmdUpdatePipelineIndirectBufferNV)gdpa(dev, "vkCmdUpdatePipelineIndirectBufferNV"); table->GetPipelineIndirectDeviceAddressNV = (PFN_vkGetPipelineIndirectDeviceAddressNV)gdpa(dev, "vkGetPipelineIndirectDeviceAddressNV"); + // ---- VK_OHOS_external_memory extension commands +#if defined(VK_USE_PLATFORM_OHOS) + table->GetNativeBufferPropertiesOHOS = (PFN_vkGetNativeBufferPropertiesOHOS)gdpa(dev, "vkGetNativeBufferPropertiesOHOS"); +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) + table->GetMemoryNativeBufferOHOS = (PFN_vkGetMemoryNativeBufferOHOS)gdpa(dev, "vkGetMemoryNativeBufferOHOS"); +#endif // VK_USE_PLATFORM_OHOS + // ---- VK_EXT_extended_dynamic_state3 extension commands table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)gdpa(dev, "vkCmdSetDepthClampEnableEXT"); table->CmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)gdpa(dev, "vkCmdSetPolygonModeEXT"); @@ -1641,6 +1652,9 @@ VKAPI_ATTR void VKAPI_CALL loader_init_instance_extension_dispatch_table(VkLayer // ---- VK_NV_cooperative_matrix2 extension commands table->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV)gpa(inst, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); + + // ---- VK_ARM_performance_counters_by_region extension commands + table->EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM)gpa(inst, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM"); } // Functions that required a terminator need to have a separate dispatch table which contains their corresponding @@ -3167,6 +3181,14 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis if (!strcmp(name, "CmdUpdatePipelineIndirectBufferNV")) return (void *)table->CmdUpdatePipelineIndirectBufferNV; if (!strcmp(name, "GetPipelineIndirectDeviceAddressNV")) return (void *)table->GetPipelineIndirectDeviceAddressNV; + // ---- VK_OHOS_external_memory extension commands +#if defined(VK_USE_PLATFORM_OHOS) + if (!strcmp(name, "GetNativeBufferPropertiesOHOS")) return (void *)table->GetNativeBufferPropertiesOHOS; +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) + if (!strcmp(name, "GetMemoryNativeBufferOHOS")) return (void *)table->GetMemoryNativeBufferOHOS; +#endif // VK_USE_PLATFORM_OHOS + // ---- VK_EXT_extended_dynamic_state3 extension commands if (!strcmp(name, "CmdSetDepthClampEnableEXT")) return (void *)table->CmdSetDepthClampEnableEXT; if (!strcmp(name, "CmdSetPolygonModeEXT")) return (void *)table->CmdSetPolygonModeEXT; @@ -3631,6 +3653,9 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerI // ---- VK_NV_cooperative_matrix2 extension commands if (!strcmp(name, "GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV")) return (void *)table->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; + // ---- VK_ARM_performance_counters_by_region extension commands + if (!strcmp(name, "EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM")) return (void *)table->EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM; + *found_name = false; return NULL; } @@ -9290,6 +9315,41 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV( } +// ---- VK_OHOS_external_memory extension trampoline/terminators + +#if defined(VK_USE_PLATFORM_OHOS) +VKAPI_ATTR VkResult VKAPI_CALL GetNativeBufferPropertiesOHOS( + VkDevice device, + const struct OH_NativeBuffer* buffer, + VkNativeBufferPropertiesOHOS* pProperties) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + if (NULL == disp) { + loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, + "vkGetNativeBufferPropertiesOHOS: Invalid device " + "[VUID-vkGetNativeBufferPropertiesOHOS-device-parameter]"); + abort(); /* Intentionally fail so user can correct issue. */ + } + return disp->GetNativeBufferPropertiesOHOS(device, buffer, pProperties); +} + +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) +VKAPI_ATTR VkResult VKAPI_CALL GetMemoryNativeBufferOHOS( + VkDevice device, + const VkMemoryGetNativeBufferInfoOHOS* pInfo, + struct OH_NativeBuffer** pBuffer) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + if (NULL == disp) { + loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, + "vkGetMemoryNativeBufferOHOS: Invalid device " + "[VUID-vkGetMemoryNativeBufferOHOS-device-parameter]"); + abort(); /* Intentionally fail so user can correct issue. */ + } + return disp->GetMemoryNativeBufferOHOS(device, pInfo, pBuffer); +} + +#endif // VK_USE_PLATFORM_OHOS + // ---- VK_EXT_extended_dynamic_state3 extension trampoline/terminators VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT( @@ -10947,6 +11007,43 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryMetalHandlePropertiesEXT( #endif // VK_USE_PLATFORM_METAL_EXT +// ---- VK_ARM_performance_counters_by_region extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + uint32_t* pCounterCount, + VkPerformanceCounterARM* pCounters, + VkPerformanceCounterDescriptionARM* pCounterDescriptions) { + const VkLayerInstanceDispatchTable *disp; + VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice); + if (VK_NULL_HANDLE == unwrapped_phys_dev) { + loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0, + "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM: Invalid physicalDevice " + "[VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM-physicalDevice-parameter]"); + abort(); /* Intentionally fail so user can correct issue. */ + } + disp = loader_get_instance_layer_dispatch(physicalDevice); + return disp->EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM(unwrapped_phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); +} + +VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM( + VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + uint32_t* pCounterCount, + VkPerformanceCounterARM* pCounters, + VkPerformanceCounterDescriptionARM* pCounterDescriptions) { + struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice; + struct loader_icd_term *icd_term = phys_dev_term->this_icd_term; + if (NULL == icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM) { + loader_log(icd_term->this_instance, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT, 0, + "ICD associated with VkPhysicalDevice does not support EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM"); + abort(); /* Intentionally fail so user can correct issue. */ + } + return icd_term->dispatch.EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM(phys_dev_term->phys_dev, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); +} + + // ---- VK_EXT_fragment_density_map_offset extension trampoline/terminators VKAPI_ATTR void VKAPI_CALL CmdEndRendering2EXT( @@ -13134,6 +13231,20 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na return true; } + // ---- VK_OHOS_external_memory extension commands +#if defined(VK_USE_PLATFORM_OHOS) + if (!strcmp("vkGetNativeBufferPropertiesOHOS", name)) { + *addr = (void *)GetNativeBufferPropertiesOHOS; + return true; + } +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) + if (!strcmp("vkGetMemoryNativeBufferOHOS", name)) { + *addr = (void *)GetMemoryNativeBufferOHOS; + return true; + } +#endif // VK_USE_PLATFORM_OHOS + // ---- VK_EXT_extended_dynamic_state3 extension commands if (!strcmp("vkCmdSetDepthClampEnableEXT", name)) { *addr = (void *)CmdSetDepthClampEnableEXT; @@ -13610,6 +13721,12 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na } #endif // VK_USE_PLATFORM_METAL_EXT + // ---- VK_ARM_performance_counters_by_region extension commands + if (!strcmp("vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM", name)) { + *addr = (void *)EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM; + return true; + } + // ---- VK_EXT_fragment_density_map_offset extension commands if (!strcmp("vkCmdEndRendering2EXT", name)) { *addr = (void *)CmdEndRendering2EXT; @@ -14245,6 +14362,9 @@ const VkLayerInstanceDispatchTable instance_disp = { // ---- VK_NV_cooperative_matrix2 extension commands .GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = terminator_GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV, + + // ---- VK_ARM_performance_counters_by_region extension commands + .EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM = terminator_EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM, }; // A null-terminated list of all of the instance extensions supported by the loader. diff --git a/loader/generated/vk_loader_extensions.h b/loader/generated/vk_loader_extensions.h index b8c55aa49..3d12ed24f 100644 --- a/loader/generated/vk_loader_extensions.h +++ b/loader/generated/vk_loader_extensions.h @@ -497,6 +497,9 @@ struct loader_icd_term_dispatch { // ---- VK_NV_cooperative_matrix2 extension commands PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV; + + // ---- VK_ARM_performance_counters_by_region extension commands + PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM; }; struct loader_instance_extension_enable_list { diff --git a/loader/loader.rc b/loader/loader.rc index 2e5b60202..cd5797ef7 100644 --- a/loader/loader.rc +++ b/loader/loader.rc @@ -22,8 +22,8 @@ #include "winres.h" // All set through CMake -#define VER_FILE_VERSION 1, 4, 330, 0 -#define VER_FILE_DESCRIPTION_STR "1.4.330.Dev Build" +#define VER_FILE_VERSION 1, 4, 331, 0 +#define VER_FILE_DESCRIPTION_STR "1.4.331.Dev Build" #define VER_FILE_VERSION_STR "Vulkan Loader - Dev Build" #define VER_COPYRIGHT_STR "Copyright (C) 2015-2025" diff --git a/scripts/known_good.json b/scripts/known_good.json index 5d06e151e..e56b94e52 100644 --- a/scripts/known_good.json +++ b/scripts/known_good.json @@ -7,7 +7,7 @@ "sub_dir": "Vulkan-Headers", "build_dir": "Vulkan-Headers/build", "install_dir": "Vulkan-Headers/build/install", - "commit": "v1.4.330" + "commit": "v1.4.331" }, { "name": "googletest", diff --git a/tests/framework/layer/generated/vk_dispatch_table_helper.h b/tests/framework/layer/generated/vk_dispatch_table_helper.h index 41535dac5..21f76e180 100644 --- a/tests/framework/layer/generated/vk_dispatch_table_helper.h +++ b/tests/framework/layer/generated/vk_dispatch_table_helper.h @@ -635,6 +635,12 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp table->GetPipelineIndirectMemoryRequirementsNV = (PFN_vkGetPipelineIndirectMemoryRequirementsNV)gpa(device, "vkGetPipelineIndirectMemoryRequirementsNV"); table->CmdUpdatePipelineIndirectBufferNV = (PFN_vkCmdUpdatePipelineIndirectBufferNV)gpa(device, "vkCmdUpdatePipelineIndirectBufferNV"); table->GetPipelineIndirectDeviceAddressNV = (PFN_vkGetPipelineIndirectDeviceAddressNV)gpa(device, "vkGetPipelineIndirectDeviceAddressNV"); +#if defined(VK_USE_PLATFORM_OHOS) + table->GetNativeBufferPropertiesOHOS = (PFN_vkGetNativeBufferPropertiesOHOS)gpa(device, "vkGetNativeBufferPropertiesOHOS"); +#endif // VK_USE_PLATFORM_OHOS +#if defined(VK_USE_PLATFORM_OHOS) + table->GetMemoryNativeBufferOHOS = (PFN_vkGetMemoryNativeBufferOHOS)gpa(device, "vkGetMemoryNativeBufferOHOS"); +#endif // VK_USE_PLATFORM_OHOS table->CmdSetDepthClampEnableEXT = (PFN_vkCmdSetDepthClampEnableEXT)gpa(device, "vkCmdSetDepthClampEnableEXT"); table->CmdSetPolygonModeEXT = (PFN_vkCmdSetPolygonModeEXT)gpa(device, "vkCmdSetPolygonModeEXT"); table->CmdSetRasterizationSamplesEXT = (PFN_vkCmdSetRasterizationSamplesEXT)gpa(device, "vkCmdSetRasterizationSamplesEXT"); @@ -943,5 +949,6 @@ static inline void layer_init_instance_dispatch_table(VkInstance instance, VkLay table->CreateSurfaceOHOS = (PFN_vkCreateSurfaceOHOS)gpa(instance, "vkCreateSurfaceOHOS"); #endif // VK_USE_PLATFORM_OHOS table->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV = (PFN_vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV)gpa(instance, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); + table->EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM = (PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM)gpa(instance, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM"); // clang-format on }