Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions loader/generated/vk_layer_dispatch_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
120 changes: 120 additions & 0 deletions loader/generated/vk_loader_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions loader/generated/vk_loader_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions loader/loader.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion scripts/known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions tests/framework/layer/generated/vk_dispatch_table_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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
}