Skip to content

Commit 9e2e61e

Browse files
committed
build: Update to header 1.4.321
1 parent 8beef6c commit 9e2e61e

File tree

8 files changed

+90
-53
lines changed

8 files changed

+90
-53
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# ~~~
1919
cmake_minimum_required(VERSION 3.22.1)
2020

21-
project(VULKAN_LOADER VERSION 1.4.320 LANGUAGES C)
21+
project(VULKAN_LOADER VERSION 1.4.321 LANGUAGES C)
2222

2323
option(CODE_COVERAGE "Enable Code Coverage" OFF)
2424
if (CODE_COVERAGE)

loader/generated/vk_layer_dispatch_table.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ typedef struct VkLayerDispatchTable_ {
729729
PFN_vkGetPipelineBinaryDataKHR GetPipelineBinaryDataKHR;
730730
PFN_vkReleaseCapturedPipelineDataKHR ReleaseCapturedPipelineDataKHR;
731731

732+
// ---- VK_KHR_swapchain_maintenance1 extension commands
733+
PFN_vkReleaseSwapchainImagesKHR ReleaseSwapchainImagesKHR;
734+
732735
// ---- VK_KHR_line_rasterization extension commands
733736
PFN_vkCmdSetLineStippleKHR CmdSetLineStippleKHR;
734737

loader/generated/vk_loader_extensions.c

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,9 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo
767767
table->GetPipelineBinaryDataKHR = (PFN_vkGetPipelineBinaryDataKHR)gdpa(dev, "vkGetPipelineBinaryDataKHR");
768768
table->ReleaseCapturedPipelineDataKHR = (PFN_vkReleaseCapturedPipelineDataKHR)gdpa(dev, "vkReleaseCapturedPipelineDataKHR");
769769

770+
// ---- VK_KHR_swapchain_maintenance1 extension commands
771+
table->ReleaseSwapchainImagesKHR = (PFN_vkReleaseSwapchainImagesKHR)gdpa(dev, "vkReleaseSwapchainImagesKHR");
772+
770773
// ---- VK_KHR_line_rasterization extension commands
771774
table->CmdSetLineStippleKHR = (PFN_vkCmdSetLineStippleKHR)gdpa(dev, "vkCmdSetLineStippleKHR");
772775

@@ -2726,6 +2729,9 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis
27262729
if (!strcmp(name, "GetPipelineBinaryDataKHR")) return (void *)table->GetPipelineBinaryDataKHR;
27272730
if (!strcmp(name, "ReleaseCapturedPipelineDataKHR")) return (void *)table->ReleaseCapturedPipelineDataKHR;
27282731

2732+
// ---- VK_KHR_swapchain_maintenance1 extension commands
2733+
if (!strcmp(name, "ReleaseSwapchainImagesKHR")) return (void *)table->ReleaseSwapchainImagesKHR;
2734+
27292735
// ---- VK_KHR_line_rasterization extension commands
27302736
if (!strcmp(name, "CmdSetLineStippleKHR")) return (void *)table->CmdSetLineStippleKHR;
27312737

@@ -5291,6 +5297,22 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseCapturedPipelineDataKHR(
52915297
}
52925298

52935299

5300+
// ---- VK_KHR_swapchain_maintenance1 extension trampoline/terminators
5301+
5302+
VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesKHR(
5303+
VkDevice device,
5304+
const VkReleaseSwapchainImagesInfoKHR* pReleaseInfo) {
5305+
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
5306+
if (NULL == disp) {
5307+
loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
5308+
"vkReleaseSwapchainImagesKHR: Invalid device "
5309+
"[VUID-vkReleaseSwapchainImagesKHR-device-parameter]");
5310+
abort(); /* Intentionally fail so user can correct issue. */
5311+
}
5312+
return disp->ReleaseSwapchainImagesKHR(device, pReleaseInfo);
5313+
}
5314+
5315+
52945316
// ---- VK_KHR_cooperative_matrix extension trampoline/terminators
52955317

52965318
VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(
@@ -7736,7 +7758,7 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(
77367758

77377759
VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT(
77387760
VkDevice device,
7739-
const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) {
7761+
const VkReleaseSwapchainImagesInfoKHR* pReleaseInfo) {
77407762
const VkLayerDispatchTable *disp = loader_get_dispatch(device);
77417763
if (NULL == disp) {
77427764
loader_log(NULL, VULKAN_LOADER_FATAL_ERROR_BIT | VULKAN_LOADER_ERROR_BIT | VULKAN_LOADER_VALIDATION_BIT, 0,
@@ -11742,6 +11764,12 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na
1174211764
return true;
1174311765
}
1174411766

11767+
// ---- VK_KHR_swapchain_maintenance1 extension commands
11768+
if (!strcmp("vkReleaseSwapchainImagesKHR", name)) {
11769+
*addr = (void *)ReleaseSwapchainImagesKHR;
11770+
return true;
11771+
}
11772+
1174511773
// ---- VK_KHR_cooperative_matrix extension commands
1174611774
if (!strcmp("vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", name)) {
1174711775
*addr = (void *)GetPhysicalDeviceCooperativeMatrixPropertiesKHR;
@@ -13534,6 +13562,9 @@ void fill_out_enabled_instance_extensions(uint32_t extension_count, const char *
1353413562
// ---- VK_KHR_portability_enumeration extension commands
1353513563
else if (0 == strcmp(extension_list[i], VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME)) { enables->khr_portability_enumeration = 1; }
1353613564

13565+
// ---- VK_KHR_surface_maintenance1 extension commands
13566+
else if (0 == strcmp(extension_list[i], VK_KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME)) { enables->khr_surface_maintenance1 = 1; }
13567+
1353713568
// ---- VK_EXT_debug_report extension commands
1353813569
else if (0 == strcmp(extension_list[i], VK_EXT_DEBUG_REPORT_EXTENSION_NAME)) { enables->ext_debug_report = 1; }
1353913570

@@ -14023,6 +14054,7 @@ const char *const LOADER_INSTANCE_EXTENSIONS[] = {
1402314054
VK_KHR_GET_DISPLAY_PROPERTIES_2_EXTENSION_NAME,
1402414055
VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME,
1402514056
VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME,
14057+
VK_KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME,
1402614058
VK_EXT_DEBUG_REPORT_EXTENSION_NAME,
1402714059
#if defined(VK_USE_PLATFORM_GGP)
1402814060
VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME,

loader/generated/vk_loader_extensions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ struct loader_instance_extension_enable_list {
526526
uint8_t khr_get_display_properties2;
527527
uint8_t khr_surface_protected_capabilities;
528528
uint8_t khr_portability_enumeration;
529+
uint8_t khr_surface_maintenance1;
529530
uint8_t ext_debug_report;
530531
#if defined(VK_USE_PLATFORM_GGP)
531532
uint8_t ggp_stream_descriptor_surface;

loader/loader.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "winres.h"
2323

2424
// All set through CMake
25-
#define VER_FILE_VERSION 1, 4, 320, 0
26-
#define VER_FILE_DESCRIPTION_STR "1.4.320.Dev Build"
25+
#define VER_FILE_VERSION 1, 4, 321, 0
26+
#define VER_FILE_DESCRIPTION_STR "1.4.321.Dev Build"
2727
#define VER_FILE_VERSION_STR "Vulkan Loader - Dev Build"
2828
#define VER_COPYRIGHT_STR "Copyright (C) 2015-2025"
2929

loader/wsi.c

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,58 +2585,54 @@ vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, cons
25852585
return disp->GetPhysicalDeviceSurfaceCapabilities2KHR(unwrapped_phys_dev, pSurfaceInfo, pSurfaceCapabilities);
25862586
}
25872587

2588-
void emulate_VK_EXT_surface_maintenance1(struct loader_icd_term *icd_term, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo,
2588+
void emulate_VK_KHR_surface_maintenance1(struct loader_icd_term *icd_term, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo,
25892589
VkSurfaceCapabilities2KHR *pSurfaceCapabilities) {
2590-
// Because VK_EXT_surface_maintenance1 is an instance extension, applications will use it to query info on drivers which do
2590+
// Because VK_KHR_surface_maintenance1 is an instance extension, applications will use it to query info on drivers which do
25912591
// not support the extension. Thus we need to emulate the driver filling out the structs in that case.
2592-
if (!icd_term->enabled_instance_extensions.ext_surface_maintenance1) {
2593-
VkPresentModeKHR present_mode = VK_PRESENT_MODE_MAX_ENUM_KHR;
2594-
const void *void_pNext = pSurfaceInfo->pNext;
2595-
while (void_pNext) {
2596-
VkBaseOutStructure out_structure = {0};
2597-
memcpy(&out_structure, void_pNext, sizeof(VkBaseOutStructure));
2598-
if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT) {
2599-
VkSurfacePresentModeEXT *surface_present_mode = (VkSurfacePresentModeEXT *)void_pNext;
2600-
present_mode = surface_present_mode->presentMode;
2601-
}
2602-
void_pNext = out_structure.pNext;
2603-
}
2604-
// If no VkSurfacePresentModeEXT was present, return
2605-
if (present_mode == VK_PRESENT_MODE_MAX_ENUM_KHR) {
2606-
return;
2592+
VkPresentModeKHR present_mode = VK_PRESENT_MODE_MAX_ENUM_KHR;
2593+
const void *void_pNext = pSurfaceInfo->pNext;
2594+
while (void_pNext) {
2595+
VkBaseOutStructure out_structure = {0};
2596+
memcpy(&out_structure, void_pNext, sizeof(VkBaseOutStructure));
2597+
if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR) {
2598+
VkSurfacePresentModeKHR *surface_present_mode = (VkSurfacePresentModeKHR *)void_pNext;
2599+
present_mode = surface_present_mode->presentMode;
26072600
}
2608-
2609-
void_pNext = pSurfaceCapabilities->pNext;
2610-
while (void_pNext) {
2611-
VkBaseOutStructure out_structure = {0};
2612-
memcpy(&out_structure, void_pNext, sizeof(VkBaseOutStructure));
2613-
if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT) {
2614-
VkSurfacePresentModeCompatibilityEXT *surface_present_mode_compatibility =
2615-
(VkSurfacePresentModeCompatibilityEXT *)void_pNext;
2616-
if (surface_present_mode_compatibility->pPresentModes) {
2617-
if (surface_present_mode_compatibility->presentModeCount != 0) {
2618-
surface_present_mode_compatibility->pPresentModes[0] = present_mode;
2619-
surface_present_mode_compatibility->presentModeCount = 1;
2620-
}
2621-
} else {
2601+
void_pNext = out_structure.pNext;
2602+
}
2603+
// If no VkSurfacePresentModeKHR was present, return
2604+
if (present_mode == VK_PRESENT_MODE_MAX_ENUM_KHR) {
2605+
return;
2606+
}
2607+
2608+
void_pNext = pSurfaceCapabilities->pNext;
2609+
while (void_pNext) {
2610+
VkBaseOutStructure out_structure = {0};
2611+
memcpy(&out_structure, void_pNext, sizeof(VkBaseOutStructure));
2612+
if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR) {
2613+
VkSurfacePresentModeCompatibilityKHR *surface_present_mode_compatibility =
2614+
(VkSurfacePresentModeCompatibilityKHR *)void_pNext;
2615+
if (surface_present_mode_compatibility->pPresentModes) {
2616+
if (surface_present_mode_compatibility->presentModeCount != 0) {
2617+
surface_present_mode_compatibility->pPresentModes[0] = present_mode;
26222618
surface_present_mode_compatibility->presentModeCount = 1;
26232619
}
2624-
2625-
} else if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT) {
2626-
// Because there is no way to fill out the information faithfully, set scaled max/min image extent to the
2627-
// surface capabilities max/min extent and the rest to zero.
2628-
VkSurfacePresentScalingCapabilitiesEXT *surface_present_scaling_capabilities =
2629-
(VkSurfacePresentScalingCapabilitiesEXT *)void_pNext;
2630-
surface_present_scaling_capabilities->supportedPresentScaling = 0;
2631-
surface_present_scaling_capabilities->supportedPresentGravityX = 0;
2632-
surface_present_scaling_capabilities->supportedPresentGravityY = 0;
2633-
surface_present_scaling_capabilities->maxScaledImageExtent =
2634-
pSurfaceCapabilities->surfaceCapabilities.maxImageExtent;
2635-
surface_present_scaling_capabilities->minScaledImageExtent =
2636-
pSurfaceCapabilities->surfaceCapabilities.minImageExtent;
2620+
} else {
2621+
surface_present_mode_compatibility->presentModeCount = 1;
26372622
}
2638-
void_pNext = out_structure.pNext;
2623+
2624+
} else if (out_structure.sType == VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_KHR) {
2625+
// Because there is no way to fill out the information faithfully, set scaled max/min image extent to the
2626+
// surface capabilities max/min extent and the rest to zero.
2627+
VkSurfacePresentScalingCapabilitiesKHR *surface_present_scaling_capabilities =
2628+
(VkSurfacePresentScalingCapabilitiesKHR *)void_pNext;
2629+
surface_present_scaling_capabilities->supportedPresentScaling = 0;
2630+
surface_present_scaling_capabilities->supportedPresentGravityX = 0;
2631+
surface_present_scaling_capabilities->supportedPresentGravityY = 0;
2632+
surface_present_scaling_capabilities->maxScaledImageExtent = pSurfaceCapabilities->surfaceCapabilities.maxImageExtent;
2633+
surface_present_scaling_capabilities->minScaledImageExtent = pSurfaceCapabilities->surfaceCapabilities.minImageExtent;
26392634
}
2635+
void_pNext = out_structure.pNext;
26402636
}
26412637
}
26422638

@@ -2684,8 +2680,9 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceCapabilities2K
26842680

26852681
// Because VK_EXT_surface_maintenance1 is an instance extension, applications will use it to query info on drivers which do
26862682
// not support the extension. Thus we need to emulate the driver filling out the structs in that case.
2687-
if (!icd_term->enabled_instance_extensions.ext_surface_maintenance1) {
2688-
emulate_VK_EXT_surface_maintenance1(icd_term, pSurfaceInfo, pSurfaceCapabilities);
2683+
if (!icd_term->enabled_instance_extensions.khr_surface_maintenance1 &&
2684+
!icd_term->enabled_instance_extensions.ext_surface_maintenance1) {
2685+
emulate_VK_KHR_surface_maintenance1(icd_term, pSurfaceInfo, pSurfaceCapabilities);
26892686
}
26902687

26912688
return res;
@@ -2708,7 +2705,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceCapabilities2K
27082705
VkResult res = icd_term->dispatch.GetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev_term->phys_dev, surface,
27092706
&pSurfaceCapabilities->surfaceCapabilities);
27102707

2711-
emulate_VK_EXT_surface_maintenance1(icd_term, pSurfaceInfo, pSurfaceCapabilities);
2708+
if (!icd_term->enabled_instance_extensions.khr_surface_maintenance1 &&
2709+
!icd_term->enabled_instance_extensions.ext_surface_maintenance1) {
2710+
emulate_VK_KHR_surface_maintenance1(icd_term, pSurfaceInfo, pSurfaceCapabilities);
2711+
}
27122712
return res;
27132713
}
27142714
}

scripts/known_good.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"sub_dir": "Vulkan-Headers",
88
"build_dir": "Vulkan-Headers/build",
99
"install_dir": "Vulkan-Headers/build/install",
10-
"commit": "v1.4.320"
10+
"commit": "v1.4.321"
1111
},
1212
{
1313
"name": "googletest",

tests/framework/layer/generated/vk_dispatch_table_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ static inline void layer_init_device_dispatch_table(VkDevice device, VkLayerDisp
361361
table->GetPipelineKeyKHR = (PFN_vkGetPipelineKeyKHR)gpa(device, "vkGetPipelineKeyKHR");
362362
table->GetPipelineBinaryDataKHR = (PFN_vkGetPipelineBinaryDataKHR)gpa(device, "vkGetPipelineBinaryDataKHR");
363363
table->ReleaseCapturedPipelineDataKHR = (PFN_vkReleaseCapturedPipelineDataKHR)gpa(device, "vkReleaseCapturedPipelineDataKHR");
364+
table->ReleaseSwapchainImagesKHR = (PFN_vkReleaseSwapchainImagesKHR)gpa(device, "vkReleaseSwapchainImagesKHR");
364365
table->CmdSetLineStippleKHR = (PFN_vkCmdSetLineStippleKHR)gpa(device, "vkCmdSetLineStippleKHR");
365366
table->GetCalibratedTimestampsKHR = (PFN_vkGetCalibratedTimestampsKHR)gpa(device, "vkGetCalibratedTimestampsKHR");
366367
table->CmdBindDescriptorSets2KHR = (PFN_vkCmdBindDescriptorSets2KHR)gpa(device, "vkCmdBindDescriptorSets2KHR");

0 commit comments

Comments
 (0)