Skip to content

Commit

Permalink
Merge pull request #16669 from unknownbrackets/vulkan-update
Browse files Browse the repository at this point in the history
Update Vulkan headers and SPIRV-Cross
  • Loading branch information
hrydgard committed Jan 4, 2023
2 parents 650390d + 3ce2c4b commit c76c09c
Show file tree
Hide file tree
Showing 13 changed files with 4,024 additions and 686 deletions.
2 changes: 1 addition & 1 deletion ext/SPIRV-Cross
Submodule SPIRV-Cross updated 1241 files
2 changes: 1 addition & 1 deletion ext/vulkan/libvulkan.so.1
Binary file removed ext/vulkan/libvulkan.so.1.2.198
Binary file not shown.
Binary file added ext/vulkan/libvulkan.so.1.3.236
Binary file not shown.
1,687 changes: 1,400 additions & 287 deletions ext/vulkan/vk_enum_string_helper.h

Large diffs are not rendered by default.

25 changes: 21 additions & 4 deletions ext/vulkan/vk_icd.h
Expand Up @@ -2,9 +2,9 @@
// File: vk_icd.h
//
/*
* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
* Copyright (c) 2015-2016, 2022 The Khronos Group Inc.
* Copyright (c) 2015-2016, 2022 Valve Corporation
* Copyright (c) 2015-2016, 2022 LunarG, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,17 @@
// call for any API version > 1.0. Otherwise, the loader will
// manually determine if it can support the expected version.
// Version 6 - Add support for vk_icdEnumerateAdapterPhysicalDevices.
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 6
// Version 7 - If an ICD supports any of the following functions, they must be
// queryable with vk_icdGetInstanceProcAddr:
// vk_icdNegotiateLoaderICDInterfaceVersion
// vk_icdGetPhysicalDeviceProcAddr
// vk_icdEnumerateAdapterPhysicalDevices (Windows only)
// In addition, these functions no longer need to be exported directly.
// This version allows drivers provided through the extension
// VK_LUNARG_direct_driver_loading be able to support the entire
// Driver-Loader interface.

#define CURRENT_LOADER_ICD_INTERFACE_VERSION 7
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4

Expand Down Expand Up @@ -123,6 +133,7 @@ typedef enum {
VK_ICD_WSI_PLATFORM_VI,
VK_ICD_WSI_PLATFORM_GGP,
VK_ICD_WSI_PLATFORM_SCREEN,
VK_ICD_WSI_PLATFORM_FUCHSIA,
} VkIcdWsiPlatform;

typedef struct {
Expand Down Expand Up @@ -242,4 +253,10 @@ typedef struct {
} VkIcdSurfaceScreen;
#endif // VK_USE_PLATFORM_SCREEN_QNX

#ifdef VK_USE_PLATFORM_FUCHSIA
typedef struct {
VkIcdSurfaceBase base;
} VkIcdSurfaceImagePipe;
#endif // VK_USE_PLATFORM_FUCHSIA

#endif // VKICD_H
2 changes: 2 additions & 0 deletions ext/vulkan/vk_sdk_platform.h
Expand Up @@ -23,7 +23,9 @@
#define VK_SDK_PLATFORM_H

#if defined(_WIN32)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifndef __cplusplus
#undef inline
#define inline __inline
Expand Down
1 change: 0 additions & 1 deletion ext/vulkan/vulkan.h
Expand Up @@ -38,7 +38,6 @@


#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include <wayland-client.h>
#include "vulkan_wayland.h"
#endif

Expand Down
564 changes: 295 additions & 269 deletions ext/vulkan/vulkan_beta.h

Large diffs are not rendered by default.

2,207 changes: 2,097 additions & 110 deletions ext/vulkan/vulkan_core.h

Large diffs are not rendered by default.

141 changes: 140 additions & 1 deletion ext/vulkan/vulkan_metal.h
Expand Up @@ -20,7 +20,6 @@ extern "C" {


#define VK_EXT_metal_surface 1

#ifdef __OBJC__
@class CAMetalLayer;
#else
Expand All @@ -47,6 +46,146 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
VkSurfaceKHR* pSurface);
#endif


#define VK_EXT_metal_objects 1
#ifdef __OBJC__
@protocol MTLDevice;
typedef id<MTLDevice> MTLDevice_id;
#else
typedef void* MTLDevice_id;
#endif

#ifdef __OBJC__
@protocol MTLCommandQueue;
typedef id<MTLCommandQueue> MTLCommandQueue_id;
#else
typedef void* MTLCommandQueue_id;
#endif

#ifdef __OBJC__
@protocol MTLBuffer;
typedef id<MTLBuffer> MTLBuffer_id;
#else
typedef void* MTLBuffer_id;
#endif

#ifdef __OBJC__
@protocol MTLTexture;
typedef id<MTLTexture> MTLTexture_id;
#else
typedef void* MTLTexture_id;
#endif

typedef struct __IOSurface* IOSurfaceRef;
#ifdef __OBJC__
@protocol MTLSharedEvent;
typedef id<MTLSharedEvent> MTLSharedEvent_id;
#else
typedef void* MTLSharedEvent_id;
#endif

#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1
#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"

typedef enum VkExportMetalObjectTypeFlagBitsEXT {
VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010,
VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020,
VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF
} VkExportMetalObjectTypeFlagBitsEXT;
typedef VkFlags VkExportMetalObjectTypeFlagsEXT;
typedef struct VkExportMetalObjectCreateInfoEXT {
VkStructureType sType;
const void* pNext;
VkExportMetalObjectTypeFlagBitsEXT exportObjectType;
} VkExportMetalObjectCreateInfoEXT;

typedef struct VkExportMetalObjectsInfoEXT {
VkStructureType sType;
const void* pNext;
} VkExportMetalObjectsInfoEXT;

typedef struct VkExportMetalDeviceInfoEXT {
VkStructureType sType;
const void* pNext;
MTLDevice_id mtlDevice;
} VkExportMetalDeviceInfoEXT;

typedef struct VkExportMetalCommandQueueInfoEXT {
VkStructureType sType;
const void* pNext;
VkQueue queue;
MTLCommandQueue_id mtlCommandQueue;
} VkExportMetalCommandQueueInfoEXT;

typedef struct VkExportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
MTLBuffer_id mtlBuffer;
} VkExportMetalBufferInfoEXT;

typedef struct VkImportMetalBufferInfoEXT {
VkStructureType sType;
const void* pNext;
MTLBuffer_id mtlBuffer;
} VkImportMetalBufferInfoEXT;

typedef struct VkExportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
VkImageView imageView;
VkBufferView bufferView;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkExportMetalTextureInfoEXT;

typedef struct VkImportMetalTextureInfoEXT {
VkStructureType sType;
const void* pNext;
VkImageAspectFlagBits plane;
MTLTexture_id mtlTexture;
} VkImportMetalTextureInfoEXT;

typedef struct VkExportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
VkImage image;
IOSurfaceRef ioSurface;
} VkExportMetalIOSurfaceInfoEXT;

typedef struct VkImportMetalIOSurfaceInfoEXT {
VkStructureType sType;
const void* pNext;
IOSurfaceRef ioSurface;
} VkImportMetalIOSurfaceInfoEXT;

typedef struct VkExportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkEvent event;
MTLSharedEvent_id mtlSharedEvent;
} VkExportMetalSharedEventInfoEXT;

typedef struct VkImportMetalSharedEventInfoEXT {
VkStructureType sType;
const void* pNext;
MTLSharedEvent_id mtlSharedEvent;
} VkImportMetalSharedEventInfoEXT;

typedef void (VKAPI_PTR *PFN_vkExportMetalObjectsEXT)(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);

#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
VkDevice device,
VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#endif

#ifdef __cplusplus
}
#endif
Expand Down
61 changes: 49 additions & 12 deletions ext/vulkan/vulkan_profiles.h
Expand Up @@ -67,54 +67,91 @@
#if defined(VK_VERSION_1_1) && \
defined(VK_EXT_descriptor_indexing) && \
defined(VK_EXT_host_query_reset) && \
defined(VK_EXT_inline_uniform_block) && \
defined(VK_EXT_memory_budget) && \
defined(VK_EXT_robustness2) && \
defined(VK_EXT_scalar_block_layout) && \
defined(VK_EXT_subgroup_size_control) && \
defined(VK_EXT_texel_buffer_alignment) && \
defined(VK_EXT_vertex_attribute_divisor) && \
defined(VK_KHR_16bit_storage) && \
defined(VK_KHR_8bit_storage) && \
defined(VK_KHR_bind_memory2) && \
defined(VK_KHR_create_renderpass2) && \
defined(VK_KHR_dedicated_allocation) && \
defined(VK_KHR_depth_stencil_resolve) && \
defined(VK_KHR_descriptor_update_template) && \
defined(VK_KHR_device_group) && \
defined(VK_KHR_driver_properties) && \
defined(VK_KHR_external_fence) && \
defined(VK_KHR_external_memory) && \
defined(VK_KHR_external_semaphore) && \
defined(VK_KHR_get_memory_requirements2) && \
defined(VK_KHR_image_format_list) && \
defined(VK_KHR_imageless_framebuffer) && \
defined(VK_KHR_maintenance1) && \
defined(VK_KHR_maintenance2) && \
defined(VK_KHR_maintenance3) && \
defined(VK_KHR_multiview) && \
defined(VK_KHR_relaxed_block_layout) && \
defined(VK_KHR_sampler_mirror_clamp_to_edge) && \
defined(VK_KHR_shader_draw_parameters) && \
defined(VK_KHR_shader_float16_int8) && \
defined(VK_KHR_storage_buffer_storage_class) && \
defined(VK_KHR_swapchain) && \
defined(VK_KHR_swapchain_mutable_format) && \
defined(VK_KHR_timeline_semaphore) && \
defined(VK_KHR_uniform_buffer_standard_layout)
#define VP_LUNARG_desktop_portability_2021 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_NAME "VP_LUNARG_desktop_portability_2021"
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_SPEC_VERSION 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_MIN_API_VERSION VK_MAKE_VERSION(1, 1, 142)
defined(VK_KHR_uniform_buffer_standard_layout) && \
defined(VK_KHR_variable_pointers)
#define VP_LUNARG_desktop_baseline_2022 1
#define VP_LUNARG_DESKTOP_BASELINE_2022_NAME "VP_LUNARG_desktop_baseline_2022"
#define VP_LUNARG_DESKTOP_BASELINE_2022_SPEC_VERSION 1
#define VP_LUNARG_DESKTOP_BASELINE_2022_MIN_API_VERSION VK_MAKE_VERSION(1, 1, 139)
#endif

#if defined(VK_VERSION_1_1) && \
defined(VK_EXT_descriptor_indexing) && \
defined(VK_EXT_host_query_reset) && \
defined(VK_EXT_inline_uniform_block) && \
defined(VK_EXT_memory_budget) && \
defined(VK_EXT_robustness2) && \
defined(VK_EXT_scalar_block_layout) && \
defined(VK_EXT_subgroup_size_control) && \
defined(VK_EXT_texel_buffer_alignment) && \
defined(VK_EXT_vertex_attribute_divisor) && \
defined(VK_KHR_16bit_storage) && \
defined(VK_KHR_8bit_storage) && \
defined(VK_KHR_bind_memory2) && \
defined(VK_KHR_create_renderpass2) && \
defined(VK_KHR_dedicated_allocation) && \
defined(VK_KHR_depth_stencil_resolve) && \
defined(VK_KHR_descriptor_update_template) && \
defined(VK_KHR_device_group) && \
defined(VK_KHR_driver_properties) && \
defined(VK_KHR_external_fence) && \
defined(VK_KHR_external_memory) && \
defined(VK_KHR_external_semaphore) && \
defined(VK_KHR_get_memory_requirements2) && \
defined(VK_KHR_image_format_list) && \
defined(VK_KHR_imageless_framebuffer) && \
defined(VK_KHR_maintenance1) && \
defined(VK_KHR_maintenance2) && \
defined(VK_KHR_maintenance3) && \
defined(VK_KHR_multiview) && \
defined(VK_KHR_portability_enumeration) && \
defined(VK_KHR_portability_subset) && \
defined(VK_KHR_relaxed_block_layout) && \
defined(VK_KHR_sampler_mirror_clamp_to_edge) && \
defined(VK_KHR_shader_draw_parameters) && \
defined(VK_KHR_shader_float16_int8) && \
defined(VK_KHR_storage_buffer_storage_class) && \
defined(VK_KHR_swapchain) && \
defined(VK_KHR_swapchain_mutable_format) && \
defined(VK_KHR_timeline_semaphore) && \
defined(VK_KHR_uniform_buffer_standard_layout)
#define VP_LUNARG_desktop_portability_2021_subset 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_SUBSET_NAME "VP_LUNARG_desktop_portability_2021_subset"
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_SUBSET_SPEC_VERSION 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2021_SUBSET_MIN_API_VERSION VK_MAKE_VERSION(1, 1, 154)
defined(VK_KHR_uniform_buffer_standard_layout) && \
defined(VK_KHR_variable_pointers)
#define VP_LUNARG_desktop_portability_2022 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2022_NAME "VP_LUNARG_desktop_portability_2022"
#define VP_LUNARG_DESKTOP_PORTABILITY_2022_SPEC_VERSION 1
#define VP_LUNARG_DESKTOP_PORTABILITY_2022_MIN_API_VERSION VK_MAKE_VERSION(1, 1, 208)
#endif

#define VP_MAX_PROFILE_NAME_SIZE 256U
Expand Down
18 changes: 18 additions & 0 deletions ext/vulkan/vulkan_win32.h
Expand Up @@ -308,6 +308,24 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
VkDeviceGroupPresentModeFlagsKHR* pModes);
#endif


#define VK_NV_acquire_winrt_display 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1
#define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);

#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display);

VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(
VkPhysicalDevice physicalDevice,
uint32_t deviceRelativeId,
VkDisplayKHR* pDisplay);
#endif

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit c76c09c

Please sign in to comment.