Skip to content

Commit

Permalink
Update for VulkanSC-Docs 1.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
oddhack committed Oct 11, 2024
1 parent 873bfb6 commit 1668f78
Show file tree
Hide file tree
Showing 15 changed files with 665 additions and 247 deletions.
51 changes: 47 additions & 4 deletions include/vulkan/vulkan_sc_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0

// Version of this file
#define VK_HEADER_VERSION 15
#define VK_HEADER_VERSION 16

// Vulkan SC variant number
#define VKSC_API_VARIANT 1
Expand Down Expand Up @@ -482,6 +482,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_SEMAPHORE_SCI_SYNC_CREATE_INFO_NV = 1000489001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV = 1000489002,
VK_STRUCTURE_TYPE_DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV = 1000489003,
VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = 1000525000,
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = 1000190001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = 1000190002,
Expand Down Expand Up @@ -2067,7 +2068,9 @@ typedef struct VkDeviceCreateInfo {
VkDeviceCreateFlags flags;
uint32_t queueCreateInfoCount;
const VkDeviceQueueCreateInfo* pQueueCreateInfos;
// enabledLayerCount is deprecated and should not be used
uint32_t enabledLayerCount;
// ppEnabledLayerNames is deprecated and should not be used
const char* const* ppEnabledLayerNames;
uint32_t enabledExtensionCount;
const char* const* ppEnabledExtensionNames;
Expand Down Expand Up @@ -4322,7 +4325,7 @@ typedef enum VkDriverId {
VK_DRIVER_ID_MESA_DOZEN = 23,
VK_DRIVER_ID_MESA_NVK = 24,
VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25,
VK_DRIVER_ID_MESA_AGXV = 26,
VK_DRIVER_ID_MESA_HONEYKRISP = 26,
VK_DRIVER_ID_RESERVED_27 = 27,
VK_DRIVER_ID_MAX_ENUM = 0x7FFFFFFF
} VkDriverId;
Expand Down Expand Up @@ -5248,6 +5251,7 @@ typedef enum VkColorSpaceKHR {
VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
// VK_COLOR_SPACE_DOLBYVISION_EXT is deprecated, but no reason was given in the API XML
VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
Expand Down Expand Up @@ -5816,8 +5820,11 @@ typedef enum VkPerformanceCounterScopeKHR {
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0,
VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1,
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2,
// VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
// VK_QUERY_SCOPE_RENDER_PASS_KHR is a deprecated alias
VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
// VK_QUERY_SCOPE_COMMAND_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
VK_PERFORMANCE_COUNTER_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkPerformanceCounterScopeKHR;
Expand All @@ -5835,7 +5842,9 @@ typedef enum VkPerformanceCounterStorageKHR {
// Flag bits for VkPerformanceCounterDescriptionFlagBitsKHR
typedef VkFlags VkPerformanceCounterDescriptionFlagBitsKHR;
#define VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR 0x00000001U
// VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a deprecated alias
#define VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR 0x00000002U
// VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a deprecated alias
#define VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR
#define VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR

Expand Down Expand Up @@ -6923,6 +6932,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
// Flag bits for VkSurfaceCounterFlagBitsEXT
typedef VkFlags VkSurfaceCounterFlagBitsEXT;
#define VK_SURFACE_COUNTER_VBLANK_BIT_EXT 0x00000001U
// VK_SURFACE_COUNTER_VBLANK_EXT is a deprecated alias
#define VK_SURFACE_COUNTER_VBLANK_EXT VK_SURFACE_COUNTER_VBLANK_BIT_EXT

typedef VkFlags VkSurfaceCounterFlagsEXT;
Expand Down Expand Up @@ -7134,13 +7144,13 @@ typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT {

// VK_EXT_swapchain_colorspace is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_swapchain_colorspace 1
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 4
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 5
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"


// VK_EXT_hdr_metadata is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_hdr_metadata 1
#define VK_EXT_HDR_METADATA_SPEC_VERSION 2
#define VK_EXT_HDR_METADATA_SPEC_VERSION 3
#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
typedef struct VkXYColorEXT {
float x;
Expand Down Expand Up @@ -8176,6 +8186,39 @@ typedef struct VkApplicationParametersEXT {
} VkApplicationParametersEXT;



// VK_EXT_layer_settings is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_layer_settings 1
#define VK_EXT_LAYER_SETTINGS_SPEC_VERSION 2
#define VK_EXT_LAYER_SETTINGS_EXTENSION_NAME "VK_EXT_layer_settings"

typedef enum VkLayerSettingTypeEXT {
VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0,
VK_LAYER_SETTING_TYPE_INT32_EXT = 1,
VK_LAYER_SETTING_TYPE_INT64_EXT = 2,
VK_LAYER_SETTING_TYPE_UINT32_EXT = 3,
VK_LAYER_SETTING_TYPE_UINT64_EXT = 4,
VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5,
VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6,
VK_LAYER_SETTING_TYPE_STRING_EXT = 7,
VK_LAYER_SETTING_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkLayerSettingTypeEXT;
typedef struct VkLayerSettingEXT {
const char* pLayerName;
const char* pSettingName;
VkLayerSettingTypeEXT type;
uint32_t valueCount;
const void* pValues;
} VkLayerSettingEXT;

typedef struct VkLayerSettingsCreateInfoEXT {
VkStructureType sType;
const void* pNext;
uint32_t settingCount;
const VkLayerSettingEXT* pSettings;
} VkLayerSettingsCreateInfoEXT;


#ifdef __cplusplus
}
#endif
Expand Down
51 changes: 47 additions & 4 deletions include/vulkan/vulkan_sc_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0

// Version of this file
#define VK_HEADER_VERSION 15
#define VK_HEADER_VERSION 16

// Vulkan SC variant number
#define VKSC_API_VARIANT 1
Expand Down Expand Up @@ -482,6 +482,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_SEMAPHORE_SCI_SYNC_CREATE_INFO_NV = 1000489001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SCI_SYNC_2_FEATURES_NV = 1000489002,
VK_STRUCTURE_TYPE_DEVICE_SEMAPHORE_SCI_SYNC_POOL_RESERVATION_CREATE_INFO_NV = 1000489003,
VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT = 1000496000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = 1000525000,
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = 1000190001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = 1000190002,
Expand Down Expand Up @@ -2067,7 +2068,9 @@ typedef struct VkDeviceCreateInfo {
VkDeviceCreateFlags flags;
uint32_t queueCreateInfoCount;
VkDeviceQueueCreateInfo const* pQueueCreateInfos;
// enabledLayerCount is deprecated and should not be used
uint32_t enabledLayerCount;
// ppEnabledLayerNames is deprecated and should not be used
char const* const* ppEnabledLayerNames;
uint32_t enabledExtensionCount;
char const* const* ppEnabledExtensionNames;
Expand Down Expand Up @@ -4322,7 +4325,7 @@ typedef enum VkDriverId {
VK_DRIVER_ID_MESA_DOZEN = 23,
VK_DRIVER_ID_MESA_NVK = 24,
VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA = 25,
VK_DRIVER_ID_MESA_AGXV = 26,
VK_DRIVER_ID_MESA_HONEYKRISP = 26,
VK_DRIVER_ID_RESERVED_27 = 27,
VK_DRIVER_ID_MAX_ENUM = 0x7FFFFFFF
} VkDriverId;
Expand Down Expand Up @@ -5248,6 +5251,7 @@ typedef enum VkColorSpaceKHR {
VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006,
VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007,
VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008,
// VK_COLOR_SPACE_DOLBYVISION_EXT is deprecated, but no reason was given in the API XML
VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009,
VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010,
VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011,
Expand Down Expand Up @@ -5816,8 +5820,11 @@ typedef enum VkPerformanceCounterScopeKHR {
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = 0,
VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = 1,
VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = 2,
// VK_QUERY_SCOPE_COMMAND_BUFFER_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_BUFFER_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
// VK_QUERY_SCOPE_RENDER_PASS_KHR is a deprecated alias
VK_QUERY_SCOPE_RENDER_PASS_KHR = VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
// VK_QUERY_SCOPE_COMMAND_KHR is a deprecated alias
VK_QUERY_SCOPE_COMMAND_KHR = VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR,
VK_PERFORMANCE_COUNTER_SCOPE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkPerformanceCounterScopeKHR;
Expand All @@ -5835,7 +5842,9 @@ typedef enum VkPerformanceCounterStorageKHR {
// Flag bits for VkPerformanceCounterDescriptionFlagBitsKHR
typedef VkFlags VkPerformanceCounterDescriptionFlagBitsKHR;
static constexpr VkPerformanceCounterDescriptionFlagBitsKHR VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR {0x00000001U};
// VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR is a deprecated alias
static constexpr VkPerformanceCounterDescriptionFlagBitsKHR VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR {0x00000002U};
// VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR is a deprecated alias
static constexpr VkPerformanceCounterDescriptionFlagBitsKHR VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR {VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR};
static constexpr VkPerformanceCounterDescriptionFlagBitsKHR VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR {VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR};

Expand Down Expand Up @@ -6923,6 +6932,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(
// Flag bits for VkSurfaceCounterFlagBitsEXT
typedef VkFlags VkSurfaceCounterFlagBitsEXT;
static constexpr VkSurfaceCounterFlagBitsEXT VK_SURFACE_COUNTER_VBLANK_BIT_EXT {0x00000001U};
// VK_SURFACE_COUNTER_VBLANK_EXT is a deprecated alias
static constexpr VkSurfaceCounterFlagBitsEXT VK_SURFACE_COUNTER_VBLANK_EXT {VK_SURFACE_COUNTER_VBLANK_BIT_EXT};

typedef VkFlags VkSurfaceCounterFlagsEXT;
Expand Down Expand Up @@ -7134,13 +7144,13 @@ typedef struct VkPipelineRasterizationDepthClipStateCreateInfoEXT {

// VK_EXT_swapchain_colorspace is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_swapchain_colorspace 1
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 4
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 5
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"


// VK_EXT_hdr_metadata is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_hdr_metadata 1
#define VK_EXT_HDR_METADATA_SPEC_VERSION 2
#define VK_EXT_HDR_METADATA_SPEC_VERSION 3
#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata"
typedef struct VkXYColorEXT {
float x;
Expand Down Expand Up @@ -8176,6 +8186,39 @@ typedef struct VkApplicationParametersEXT {
} VkApplicationParametersEXT;



// VK_EXT_layer_settings is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_layer_settings 1
#define VK_EXT_LAYER_SETTINGS_SPEC_VERSION 2
#define VK_EXT_LAYER_SETTINGS_EXTENSION_NAME "VK_EXT_layer_settings"

typedef enum VkLayerSettingTypeEXT {
VK_LAYER_SETTING_TYPE_BOOL32_EXT = 0,
VK_LAYER_SETTING_TYPE_INT32_EXT = 1,
VK_LAYER_SETTING_TYPE_INT64_EXT = 2,
VK_LAYER_SETTING_TYPE_UINT32_EXT = 3,
VK_LAYER_SETTING_TYPE_UINT64_EXT = 4,
VK_LAYER_SETTING_TYPE_FLOAT32_EXT = 5,
VK_LAYER_SETTING_TYPE_FLOAT64_EXT = 6,
VK_LAYER_SETTING_TYPE_STRING_EXT = 7,
VK_LAYER_SETTING_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
} VkLayerSettingTypeEXT;
typedef struct VkLayerSettingEXT {
char const* pLayerName;
char const* pSettingName;
VkLayerSettingTypeEXT type;
uint32_t valueCount;
void const* pValues;
} VkLayerSettingEXT;

typedef struct VkLayerSettingsCreateInfoEXT {
VkStructureType sType;
void const* pNext;
uint32_t settingCount;
VkLayerSettingEXT const* pSettings;
} VkLayerSettingsCreateInfoEXT;


#ifdef __cplusplus
}
#endif
Expand Down
24 changes: 24 additions & 0 deletions json/vk.json
Original file line number Diff line number Diff line change
Expand Up @@ -5278,6 +5278,30 @@
}
},

"VkLayerSettingTypeEXT": {"$ref": "#/definitions/enum"},
"VkLayerSettingEXT": {
"type": "object",
"additionalProperties": false,
"properties": {
"pLayerName": {"oneOf": [{"$ref": "#/definitions/void"},{"$ref": "#/definitions/char"}]},
"pSettingName": {"oneOf": [{"$ref": "#/definitions/void"},{"$ref": "#/definitions/char"}]},
"type": {"$ref": "#/definitions/VkLayerSettingTypeEXT"},
"valueCount": {"$ref": "#/definitions/uint32_t"},
"pValues": {"oneOf": [{"$ref": "#/definitions/void"}, {"type": "array", "minItems": 0, "maxItems": 255, "items": {"$ref": "#/definitions/uint8_t"}}, {"type": "string"}]}
}
},

"VkLayerSettingsCreateInfoEXT": {
"type": "object",
"additionalProperties": false,
"properties": {
"sType": {"$ref": "#/definitions/VkStructureType"},
"pNext": {"$ref": "#/definitions/void"},
"settingCount": {"$ref": "#/definitions/uint32_t"},
"pSettings": {"oneOf": [{"$ref": "#/definitions/void"}, {"type": "array", "minItems": 0, "maxItems": 255, "items": {"$ref": "#/definitions/VkLayerSettingEXT"}}]}
}
},

"VkLastStructure": {
}
}
Expand Down
2 changes: 1 addition & 1 deletion registry/apiconventions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2021-2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
Expand Down
17 changes: 11 additions & 6 deletions registry/cgenerator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
#
Expand Down Expand Up @@ -334,15 +334,18 @@ def genType(self, typeinfo, name, alias):
else:
if self.genOpts is None:
raise MissingGeneratorOptionsError()

body = self.deprecationComment(typeElem)

# OpenXR: this section was not under 'else:' previously, just fell through
if alias:
# If the type is an alias, just emit a typedef declaration
body = 'typedef ' + alias + ' ' + name + ';\n'
body += 'typedef ' + alias + ' ' + name + ';\n'
else:
# Replace <apientry /> tags with an APIENTRY-style string
# (from self.genOpts). Copy other text through unchanged.
# If the resulting text is an empty string, do not emit it.
body = noneStr(typeElem.text)
body += noneStr(typeElem.text)
for elem in typeElem:
if elem.tag == 'apientry':
body += self.genOpts.apientry + noneStr(elem.tail)
Expand Down Expand Up @@ -417,11 +420,11 @@ def genStruct(self, typeinfo, typeName, alias):
raise MissingGeneratorOptionsError()

typeElem = typeinfo.elem
body = self.deprecationComment(typeElem)

if alias:
body = 'typedef ' + alias + ' ' + typeName + ';\n'
body += 'typedef ' + alias + ' ' + typeName + ';\n'
else:
body = ''
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
if protect_begin:
body += protect_begin
Expand All @@ -442,6 +445,7 @@ def genStruct(self, typeinfo, typeName, alias):

targetLen = self.getMaxCParamTypeLength(typeinfo)
for member in typeElem.findall('.//member'):
body += self.deprecationComment(member, indent = 4)
body += self.makeCParamDecl(member, targetLen + 4)
body += ';\n'
body += '} ' + typeName + ';\n'
Expand Down Expand Up @@ -486,7 +490,8 @@ def genEnum(self, enuminfo, name, alias):

OutputGenerator.genEnum(self, enuminfo, name, alias)

body = self.buildConstantCDecl(enuminfo, name, alias)
body = self.deprecationComment(enuminfo.elem)
body += self.buildConstantCDecl(enuminfo, name, alias)
self.appendSection('enum', body)

def genCmd(self, cmdinfo, name, alias):
Expand Down
Loading

0 comments on commit 1668f78

Please sign in to comment.