Fork main
branch to sc_main
for initial public Vulkan SC specification release.
Remove the generated Vulkan headers. New Vulkan SC generated files will be added in the initial public release tag.
This commit is contained in:
parent
aa18f182eb
commit
787244e9a2
23
README.md
23
README.md
@ -4,7 +4,11 @@ Vulkan header files and API registry
|
|||||||
|
|
||||||
## Default branch changed to 'main' 2021-09-12
|
## Default branch changed to 'main' 2021-09-12
|
||||||
|
|
||||||
As discussed in #222, the default branch of this repository is now 'main'. This change should be largely transparent to repository users, since github rewrites many references to the old 'master' branch to 'main'. However, if you have a checked-out local clone, you may wish to take the following steps as recommended by github:
|
As discussed in #222, the default branch of this repository is now 'main'.
|
||||||
|
This change should be largely transparent to repository users, since github
|
||||||
|
rewrites many references to the old 'master' branch to 'main'. However, if
|
||||||
|
you have a checked-out local clone, you may wish to take the following steps
|
||||||
|
as recommended by github:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git branch -m master main
|
git branch -m master main
|
||||||
@ -13,12 +17,19 @@ git branch -u origin/main main
|
|||||||
git remote set-head origin -a
|
git remote set-head origin -a
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Vulkan SC Headers and JSON Files
|
||||||
|
|
||||||
|
The `sc_main` branch of this repository contains generated headers and JSON
|
||||||
|
files for the Vulkan SC specification.
|
||||||
|
The API XML and some of the scripts in this branch differ slightly from the
|
||||||
|
equivalent files in the `main` branch for Vulkan.
|
||||||
|
|
||||||
## Repository Content
|
## Repository Content
|
||||||
|
|
||||||
The contents of this repository are largely obtained from other repositories
|
The contents of this repository are largely obtained from other repositories
|
||||||
and are collected, coordinated, and curated here.
|
and are collected, coordinated, and curated here.
|
||||||
|
|
||||||
If proposing changes to any file originating from a different repository,
|
If proposking changes to any file originating from a different repository,
|
||||||
please propose such changes in that repository, rather than Vulkan-Headers.
|
please propose such changes in that repository, rather than Vulkan-Headers.
|
||||||
Files in this repository originate from:
|
Files in this repository originate from:
|
||||||
|
|
||||||
@ -57,6 +68,9 @@ As of the Vulkan-Docs 1.2.182 spec update, the Vulkan-Hpp headers have been
|
|||||||
split into multiple files. All of those files are now included in this
|
split into multiple files. All of those files are now included in this
|
||||||
repository.
|
repository.
|
||||||
|
|
||||||
|
*NOTE*: the `sc_main_ branch does not currently contain C++ headers, which
|
||||||
|
are not currently generated for Vulkan SC.
|
||||||
|
|
||||||
* include/vulkan/vulkan.hpp
|
* include/vulkan/vulkan.hpp
|
||||||
* include/vulkan/vulkan_enums.hpp
|
* include/vulkan/vulkan_enums.hpp
|
||||||
* include/vulkan/vulkan_funcs.hpp
|
* include/vulkan/vulkan_funcs.hpp
|
||||||
@ -68,7 +82,10 @@ repository.
|
|||||||
|
|
||||||
Updates to the `Vulkan-Headers` repository which correspond to a new Vulkan
|
Updates to the `Vulkan-Headers` repository which correspond to a new Vulkan
|
||||||
specification release are tagged using the following format:
|
specification release are tagged using the following format:
|
||||||
`v<`_`version`_`>` (e.g., `v1.1.96`).
|
`v<`_`version`_`>` (e.g., `v1.3.202`).
|
||||||
|
|
||||||
|
Updates which correspond to a new Vulkan SC specification release are tagged
|
||||||
|
using the following format: `vksc<`_`version`_`>` (e.g., `vksc1.0.9`).
|
||||||
|
|
||||||
**Note**: Marked version releases have undergone thorough testing but do not
|
**Note**: Marked version releases have undergone thorough testing but do not
|
||||||
imply the same quality level as SDK tags. SDK tags follow the
|
imply the same quality level as SDK tags. SDK tags follow the
|
||||||
|
@ -1,308 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h264std 1
|
|
||||||
#include <stdint.h>
|
|
||||||
// Vulkan 0.9 provisional Vulkan video H.264 encode and decode std specification version number
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0
|
|
||||||
|
|
||||||
#define STD_VIDEO_H264_CPB_CNT_LIST_SIZE 32
|
|
||||||
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS 6
|
|
||||||
#define STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
|
||||||
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS 2
|
|
||||||
#define STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_API_VERSION_0_9_5
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H264_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264"
|
|
||||||
|
|
||||||
typedef enum StdVideoH264ChromaFormatIdc {
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_420 = 1,
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_422 = 2,
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_444 = 3,
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264ChromaFormatIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264ProfileIdc {
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_BASELINE = 66,
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_MAIN = 77,
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_HIGH = 100,
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE = 244,
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264ProfileIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264Level {
|
|
||||||
STD_VIDEO_H264_LEVEL_1_0 = 0,
|
|
||||||
STD_VIDEO_H264_LEVEL_1_1 = 1,
|
|
||||||
STD_VIDEO_H264_LEVEL_1_2 = 2,
|
|
||||||
STD_VIDEO_H264_LEVEL_1_3 = 3,
|
|
||||||
STD_VIDEO_H264_LEVEL_2_0 = 4,
|
|
||||||
STD_VIDEO_H264_LEVEL_2_1 = 5,
|
|
||||||
STD_VIDEO_H264_LEVEL_2_2 = 6,
|
|
||||||
STD_VIDEO_H264_LEVEL_3_0 = 7,
|
|
||||||
STD_VIDEO_H264_LEVEL_3_1 = 8,
|
|
||||||
STD_VIDEO_H264_LEVEL_3_2 = 9,
|
|
||||||
STD_VIDEO_H264_LEVEL_4_0 = 10,
|
|
||||||
STD_VIDEO_H264_LEVEL_4_1 = 11,
|
|
||||||
STD_VIDEO_H264_LEVEL_4_2 = 12,
|
|
||||||
STD_VIDEO_H264_LEVEL_5_0 = 13,
|
|
||||||
STD_VIDEO_H264_LEVEL_5_1 = 14,
|
|
||||||
STD_VIDEO_H264_LEVEL_5_2 = 15,
|
|
||||||
STD_VIDEO_H264_LEVEL_6_0 = 16,
|
|
||||||
STD_VIDEO_H264_LEVEL_6_1 = 17,
|
|
||||||
STD_VIDEO_H264_LEVEL_6_2 = 18,
|
|
||||||
STD_VIDEO_H264_LEVEL_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_LEVEL_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264Level;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264PocType {
|
|
||||||
STD_VIDEO_H264_POC_TYPE_0 = 0,
|
|
||||||
STD_VIDEO_H264_POC_TYPE_1 = 1,
|
|
||||||
STD_VIDEO_H264_POC_TYPE_2 = 2,
|
|
||||||
STD_VIDEO_H264_POC_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_POC_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264PocType;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264AspectRatioIdc {
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED = 0,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE = 1,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11 = 2,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11 = 3,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11 = 4,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33 = 5,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11 = 6,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11 = 7,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11 = 8,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33 = 9,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11 = 10,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11 = 11,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33 = 12,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99 = 13,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3 = 14,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2 = 15,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1 = 16,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR = 255,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264AspectRatioIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264WeightedBipredIdc {
|
|
||||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT = 0,
|
|
||||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT = 1,
|
|
||||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT = 2,
|
|
||||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264WeightedBipredIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264ModificationOfPicNumsIdc {
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT = 0,
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD = 1,
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM = 2,
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END = 3,
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264ModificationOfPicNumsIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264MemMgmtControlOp {
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END = 0,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM = 1,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM = 2,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM = 3,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX = 4,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL = 5,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM = 6,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264MemMgmtControlOp;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264CabacInitIdc {
|
|
||||||
STD_VIDEO_H264_CABAC_INIT_IDC_0 = 0,
|
|
||||||
STD_VIDEO_H264_CABAC_INIT_IDC_1 = 1,
|
|
||||||
STD_VIDEO_H264_CABAC_INIT_IDC_2 = 2,
|
|
||||||
STD_VIDEO_H264_CABAC_INIT_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264CabacInitIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264DisableDeblockingFilterIdc {
|
|
||||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED = 0,
|
|
||||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED = 1,
|
|
||||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL = 2,
|
|
||||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264DisableDeblockingFilterIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264SliceType {
|
|
||||||
STD_VIDEO_H264_SLICE_TYPE_P = 0,
|
|
||||||
STD_VIDEO_H264_SLICE_TYPE_B = 1,
|
|
||||||
STD_VIDEO_H264_SLICE_TYPE_I = 2,
|
|
||||||
STD_VIDEO_H264_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264SliceType;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264PictureType {
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_P = 0,
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_B = 1,
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_I = 2,
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_IDR = 5,
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264PictureType;
|
|
||||||
|
|
||||||
typedef enum StdVideoH264NonVclNaluType {
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS = 0,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS = 1,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD = 2,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX = 3,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE = 4,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM = 5,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED = 6,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH264NonVclNaluType;
|
|
||||||
typedef struct StdVideoH264SpsVuiFlags {
|
|
||||||
uint32_t aspect_ratio_info_present_flag : 1;
|
|
||||||
uint32_t overscan_info_present_flag : 1;
|
|
||||||
uint32_t overscan_appropriate_flag : 1;
|
|
||||||
uint32_t video_signal_type_present_flag : 1;
|
|
||||||
uint32_t video_full_range_flag : 1;
|
|
||||||
uint32_t color_description_present_flag : 1;
|
|
||||||
uint32_t chroma_loc_info_present_flag : 1;
|
|
||||||
uint32_t timing_info_present_flag : 1;
|
|
||||||
uint32_t fixed_frame_rate_flag : 1;
|
|
||||||
uint32_t bitstream_restriction_flag : 1;
|
|
||||||
uint32_t nal_hrd_parameters_present_flag : 1;
|
|
||||||
uint32_t vcl_hrd_parameters_present_flag : 1;
|
|
||||||
} StdVideoH264SpsVuiFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264HrdParameters {
|
|
||||||
uint8_t cpb_cnt_minus1;
|
|
||||||
uint8_t bit_rate_scale;
|
|
||||||
uint8_t cpb_size_scale;
|
|
||||||
uint32_t bit_rate_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t cpb_size_value_minus1[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
|
||||||
uint8_t cbr_flag[STD_VIDEO_H264_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t initial_cpb_removal_delay_length_minus1;
|
|
||||||
uint32_t cpb_removal_delay_length_minus1;
|
|
||||||
uint32_t dpb_output_delay_length_minus1;
|
|
||||||
uint32_t time_offset_length;
|
|
||||||
} StdVideoH264HrdParameters;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264SequenceParameterSetVui {
|
|
||||||
StdVideoH264AspectRatioIdc aspect_ratio_idc;
|
|
||||||
uint16_t sar_width;
|
|
||||||
uint16_t sar_height;
|
|
||||||
uint8_t video_format;
|
|
||||||
uint8_t color_primaries;
|
|
||||||
uint8_t transfer_characteristics;
|
|
||||||
uint8_t matrix_coefficients;
|
|
||||||
uint32_t num_units_in_tick;
|
|
||||||
uint32_t time_scale;
|
|
||||||
StdVideoH264HrdParameters* pHrdParameters;
|
|
||||||
uint8_t max_num_reorder_frames;
|
|
||||||
uint8_t max_dec_frame_buffering;
|
|
||||||
StdVideoH264SpsVuiFlags flags;
|
|
||||||
} StdVideoH264SequenceParameterSetVui;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264SpsFlags {
|
|
||||||
uint32_t constraint_set0_flag : 1;
|
|
||||||
uint32_t constraint_set1_flag : 1;
|
|
||||||
uint32_t constraint_set2_flag : 1;
|
|
||||||
uint32_t constraint_set3_flag : 1;
|
|
||||||
uint32_t constraint_set4_flag : 1;
|
|
||||||
uint32_t constraint_set5_flag : 1;
|
|
||||||
uint32_t direct_8x8_inference_flag : 1;
|
|
||||||
uint32_t mb_adaptive_frame_field_flag : 1;
|
|
||||||
uint32_t frame_mbs_only_flag : 1;
|
|
||||||
uint32_t delta_pic_order_always_zero_flag : 1;
|
|
||||||
uint32_t separate_colour_plane_flag : 1;
|
|
||||||
uint32_t gaps_in_frame_num_value_allowed_flag : 1;
|
|
||||||
uint32_t qpprime_y_zero_transform_bypass_flag : 1;
|
|
||||||
uint32_t frame_cropping_flag : 1;
|
|
||||||
uint32_t seq_scaling_matrix_present_flag : 1;
|
|
||||||
uint32_t vui_parameters_present_flag : 1;
|
|
||||||
} StdVideoH264SpsFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264ScalingLists {
|
|
||||||
uint8_t scaling_list_present_mask;
|
|
||||||
uint8_t use_default_scaling_matrix_mask;
|
|
||||||
uint8_t ScalingList4x4[STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS];
|
|
||||||
uint8_t ScalingList8x8[STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS];
|
|
||||||
} StdVideoH264ScalingLists;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264SequenceParameterSet {
|
|
||||||
StdVideoH264ProfileIdc profile_idc;
|
|
||||||
StdVideoH264Level level_idc;
|
|
||||||
uint8_t seq_parameter_set_id;
|
|
||||||
StdVideoH264ChromaFormatIdc chroma_format_idc;
|
|
||||||
uint8_t bit_depth_luma_minus8;
|
|
||||||
uint8_t bit_depth_chroma_minus8;
|
|
||||||
uint8_t log2_max_frame_num_minus4;
|
|
||||||
StdVideoH264PocType pic_order_cnt_type;
|
|
||||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
|
||||||
int32_t offset_for_non_ref_pic;
|
|
||||||
int32_t offset_for_top_to_bottom_field;
|
|
||||||
uint8_t num_ref_frames_in_pic_order_cnt_cycle;
|
|
||||||
uint8_t max_num_ref_frames;
|
|
||||||
uint32_t pic_width_in_mbs_minus1;
|
|
||||||
uint32_t pic_height_in_map_units_minus1;
|
|
||||||
uint32_t frame_crop_left_offset;
|
|
||||||
uint32_t frame_crop_right_offset;
|
|
||||||
uint32_t frame_crop_top_offset;
|
|
||||||
uint32_t frame_crop_bottom_offset;
|
|
||||||
StdVideoH264SpsFlags flags;
|
|
||||||
int32_t* pOffsetForRefFrame;
|
|
||||||
StdVideoH264ScalingLists* pScalingLists;
|
|
||||||
StdVideoH264SequenceParameterSetVui* pSequenceParameterSetVui;
|
|
||||||
} StdVideoH264SequenceParameterSet;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264PpsFlags {
|
|
||||||
uint32_t transform_8x8_mode_flag : 1;
|
|
||||||
uint32_t redundant_pic_cnt_present_flag : 1;
|
|
||||||
uint32_t constrained_intra_pred_flag : 1;
|
|
||||||
uint32_t deblocking_filter_control_present_flag : 1;
|
|
||||||
uint32_t weighted_bipred_idc_flag : 1;
|
|
||||||
uint32_t weighted_pred_flag : 1;
|
|
||||||
uint32_t pic_order_present_flag : 1;
|
|
||||||
uint32_t entropy_coding_mode_flag : 1;
|
|
||||||
uint32_t pic_scaling_matrix_present_flag : 1;
|
|
||||||
} StdVideoH264PpsFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH264PictureParameterSet {
|
|
||||||
uint8_t seq_parameter_set_id;
|
|
||||||
uint8_t pic_parameter_set_id;
|
|
||||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
|
||||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
|
||||||
StdVideoH264WeightedBipredIdc weighted_bipred_idc;
|
|
||||||
int8_t pic_init_qp_minus26;
|
|
||||||
int8_t pic_init_qs_minus26;
|
|
||||||
int8_t chroma_qp_index_offset;
|
|
||||||
int8_t second_chroma_qp_index_offset;
|
|
||||||
StdVideoH264PpsFlags flags;
|
|
||||||
StdVideoH264ScalingLists* pScalingLists;
|
|
||||||
} StdVideoH264PictureParameterSet;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,98 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_DECODE_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h264std_decode 1
|
|
||||||
#define STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE 2
|
|
||||||
#define STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE 15
|
|
||||||
|
|
||||||
typedef enum StdVideoDecodeH264FieldOrderCount {
|
|
||||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP = 0,
|
|
||||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM = 1,
|
|
||||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoDecodeH264FieldOrderCount;
|
|
||||||
typedef struct StdVideoDecodeH264PictureInfoFlags {
|
|
||||||
uint32_t field_pic_flag : 1;
|
|
||||||
uint32_t is_intra : 1;
|
|
||||||
uint32_t IdrPicFlag : 1;
|
|
||||||
uint32_t bottom_field_flag : 1;
|
|
||||||
uint32_t is_reference : 1;
|
|
||||||
uint32_t complementary_field_pair : 1;
|
|
||||||
} StdVideoDecodeH264PictureInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264PictureInfo {
|
|
||||||
uint8_t seq_parameter_set_id;
|
|
||||||
uint8_t pic_parameter_set_id;
|
|
||||||
uint16_t reserved;
|
|
||||||
uint16_t frame_num;
|
|
||||||
uint16_t idr_pic_id;
|
|
||||||
int32_t PicOrderCnt[STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE];
|
|
||||||
StdVideoDecodeH264PictureInfoFlags flags;
|
|
||||||
} StdVideoDecodeH264PictureInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264ReferenceInfoFlags {
|
|
||||||
uint32_t top_field_flag : 1;
|
|
||||||
uint32_t bottom_field_flag : 1;
|
|
||||||
uint32_t is_long_term : 1;
|
|
||||||
uint32_t is_non_existing : 1;
|
|
||||||
} StdVideoDecodeH264ReferenceInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264ReferenceInfo {
|
|
||||||
uint16_t FrameNum;
|
|
||||||
uint16_t reserved;
|
|
||||||
int32_t PicOrderCnt[2];
|
|
||||||
StdVideoDecodeH264ReferenceInfoFlags flags;
|
|
||||||
} StdVideoDecodeH264ReferenceInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264MvcElementFlags {
|
|
||||||
uint32_t non_idr : 1;
|
|
||||||
uint32_t anchor_pic : 1;
|
|
||||||
uint32_t inter_view : 1;
|
|
||||||
} StdVideoDecodeH264MvcElementFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264MvcElement {
|
|
||||||
StdVideoDecodeH264MvcElementFlags flags;
|
|
||||||
uint16_t viewOrderIndex;
|
|
||||||
uint16_t viewId;
|
|
||||||
uint16_t temporalId;
|
|
||||||
uint16_t priorityId;
|
|
||||||
uint16_t numOfAnchorRefsInL0;
|
|
||||||
uint16_t viewIdOfAnchorRefsInL0[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
|
||||||
uint16_t numOfAnchorRefsInL1;
|
|
||||||
uint16_t viewIdOfAnchorRefsInL1[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
|
||||||
uint16_t numOfNonAnchorRefsInL0;
|
|
||||||
uint16_t viewIdOfNonAnchorRefsInL0[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
|
||||||
uint16_t numOfNonAnchorRefsInL1;
|
|
||||||
uint16_t viewIdOfNonAnchorRefsInL1[STD_VIDEO_DECODE_H264_MVC_REF_LIST_SIZE];
|
|
||||||
} StdVideoDecodeH264MvcElement;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH264Mvc {
|
|
||||||
uint32_t viewId0;
|
|
||||||
uint32_t mvcElementCount;
|
|
||||||
StdVideoDecodeH264MvcElement* pMvcElements;
|
|
||||||
} StdVideoDecodeH264Mvc;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,105 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h264std_encode 1
|
|
||||||
typedef struct StdVideoEncodeH264SliceHeaderFlags {
|
|
||||||
uint32_t direct_spatial_mv_pred_flag : 1;
|
|
||||||
uint32_t num_ref_idx_active_override_flag : 1;
|
|
||||||
uint32_t no_output_of_prior_pics_flag : 1;
|
|
||||||
uint32_t adaptive_ref_pic_marking_mode_flag : 1;
|
|
||||||
uint32_t no_prior_references_available_flag : 1;
|
|
||||||
} StdVideoEncodeH264SliceHeaderFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264PictureInfoFlags {
|
|
||||||
uint32_t idr_flag : 1;
|
|
||||||
uint32_t is_reference_flag : 1;
|
|
||||||
uint32_t long_term_reference_flag : 1;
|
|
||||||
} StdVideoEncodeH264PictureInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264ReferenceInfoFlags {
|
|
||||||
uint32_t is_long_term : 1;
|
|
||||||
} StdVideoEncodeH264ReferenceInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefMgmtFlags {
|
|
||||||
uint32_t ref_pic_list_modification_l0_flag : 1;
|
|
||||||
uint32_t ref_pic_list_modification_l1_flag : 1;
|
|
||||||
} StdVideoEncodeH264RefMgmtFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefListModEntry {
|
|
||||||
StdVideoH264ModificationOfPicNumsIdc modification_of_pic_nums_idc;
|
|
||||||
uint16_t abs_diff_pic_num_minus1;
|
|
||||||
uint16_t long_term_pic_num;
|
|
||||||
} StdVideoEncodeH264RefListModEntry;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefPicMarkingEntry {
|
|
||||||
StdVideoH264MemMgmtControlOp operation;
|
|
||||||
uint16_t difference_of_pic_nums_minus1;
|
|
||||||
uint16_t long_term_pic_num;
|
|
||||||
uint16_t long_term_frame_idx;
|
|
||||||
uint16_t max_long_term_frame_idx_plus1;
|
|
||||||
} StdVideoEncodeH264RefPicMarkingEntry;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264RefMemMgmtCtrlOperations {
|
|
||||||
StdVideoEncodeH264RefMgmtFlags flags;
|
|
||||||
uint8_t refList0ModOpCount;
|
|
||||||
StdVideoEncodeH264RefListModEntry* pRefList0ModOperations;
|
|
||||||
uint8_t refList1ModOpCount;
|
|
||||||
StdVideoEncodeH264RefListModEntry* pRefList1ModOperations;
|
|
||||||
uint8_t refPicMarkingOpCount;
|
|
||||||
StdVideoEncodeH264RefPicMarkingEntry* pRefPicMarkingOperations;
|
|
||||||
} StdVideoEncodeH264RefMemMgmtCtrlOperations;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264PictureInfo {
|
|
||||||
StdVideoEncodeH264PictureInfoFlags flags;
|
|
||||||
StdVideoH264PictureType pictureType;
|
|
||||||
uint32_t frame_num;
|
|
||||||
int32_t PicOrderCnt;
|
|
||||||
} StdVideoEncodeH264PictureInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264ReferenceInfo {
|
|
||||||
StdVideoEncodeH264ReferenceInfoFlags flags;
|
|
||||||
uint32_t FrameNum;
|
|
||||||
int32_t PicOrderCnt;
|
|
||||||
uint16_t long_term_pic_num;
|
|
||||||
uint16_t long_term_frame_idx;
|
|
||||||
} StdVideoEncodeH264ReferenceInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH264SliceHeader {
|
|
||||||
StdVideoEncodeH264SliceHeaderFlags flags;
|
|
||||||
uint32_t first_mb_in_slice;
|
|
||||||
StdVideoH264SliceType slice_type;
|
|
||||||
uint8_t seq_parameter_set_id;
|
|
||||||
uint8_t pic_parameter_set_id;
|
|
||||||
uint16_t idr_pic_id;
|
|
||||||
uint8_t num_ref_idx_l0_active_minus1;
|
|
||||||
uint8_t num_ref_idx_l1_active_minus1;
|
|
||||||
StdVideoH264CabacInitIdc cabac_init_idc;
|
|
||||||
StdVideoH264DisableDeblockingFilterIdc disable_deblocking_filter_idc;
|
|
||||||
int8_t slice_alpha_c0_offset_div2;
|
|
||||||
int8_t slice_beta_offset_div2;
|
|
||||||
} StdVideoEncodeH264SliceHeader;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,360 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h265std 1
|
|
||||||
// Vulkan 0.5 version number WIP
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5 VK_MAKE_VIDEO_STD_VERSION(0, 9, 5) // Patch version should always be set to 0
|
|
||||||
|
|
||||||
#define STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE 7
|
|
||||||
#define STD_VIDEO_H265_CPB_CNT_LIST_SIZE 32
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS 6
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS 16
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS 6
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS 64
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS 6
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS 64
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS 2
|
|
||||||
#define STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS 64
|
|
||||||
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE 3
|
|
||||||
#define STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE 128
|
|
||||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE 19
|
|
||||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE 21
|
|
||||||
#define STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE 6
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_API_VERSION_0_9_5
|
|
||||||
#define VK_STD_VULKAN_VIDEO_CODEC_H265_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265"
|
|
||||||
|
|
||||||
typedef enum StdVideoH265ChromaFormatIdc {
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME = 0,
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_420 = 1,
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_422 = 2,
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_444 = 3,
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH265ChromaFormatIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH265ProfileIdc {
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_MAIN = 1,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_MAIN_10 = 2,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE = 3,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS = 4,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS = 9,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH265ProfileIdc;
|
|
||||||
|
|
||||||
typedef enum StdVideoH265Level {
|
|
||||||
STD_VIDEO_H265_LEVEL_1_0 = 0,
|
|
||||||
STD_VIDEO_H265_LEVEL_2_0 = 1,
|
|
||||||
STD_VIDEO_H265_LEVEL_2_1 = 2,
|
|
||||||
STD_VIDEO_H265_LEVEL_3_0 = 3,
|
|
||||||
STD_VIDEO_H265_LEVEL_3_1 = 4,
|
|
||||||
STD_VIDEO_H265_LEVEL_4_0 = 5,
|
|
||||||
STD_VIDEO_H265_LEVEL_4_1 = 6,
|
|
||||||
STD_VIDEO_H265_LEVEL_5_0 = 7,
|
|
||||||
STD_VIDEO_H265_LEVEL_5_1 = 8,
|
|
||||||
STD_VIDEO_H265_LEVEL_5_2 = 9,
|
|
||||||
STD_VIDEO_H265_LEVEL_6_0 = 10,
|
|
||||||
STD_VIDEO_H265_LEVEL_6_1 = 11,
|
|
||||||
STD_VIDEO_H265_LEVEL_6_2 = 12,
|
|
||||||
STD_VIDEO_H265_LEVEL_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H265_LEVEL_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH265Level;
|
|
||||||
|
|
||||||
typedef enum StdVideoH265SliceType {
|
|
||||||
STD_VIDEO_H265_SLICE_TYPE_B = 0,
|
|
||||||
STD_VIDEO_H265_SLICE_TYPE_P = 1,
|
|
||||||
STD_VIDEO_H265_SLICE_TYPE_I = 2,
|
|
||||||
STD_VIDEO_H265_SLICE_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH265SliceType;
|
|
||||||
|
|
||||||
typedef enum StdVideoH265PictureType {
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_P = 0,
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_B = 1,
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_I = 2,
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_IDR = 3,
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_INVALID = 0x7FFFFFFF,
|
|
||||||
STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
|
||||||
} StdVideoH265PictureType;
|
|
||||||
typedef struct StdVideoH265DecPicBufMgr {
|
|
||||||
uint32_t max_latency_increase_plus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
uint8_t max_dec_pic_buffering_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
uint8_t max_num_reorder_pics[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
} StdVideoH265DecPicBufMgr;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SubLayerHrdParameters {
|
|
||||||
uint32_t bit_rate_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t cpb_size_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t cpb_size_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t bit_rate_du_value_minus1[STD_VIDEO_H265_CPB_CNT_LIST_SIZE];
|
|
||||||
uint32_t cbr_flag;
|
|
||||||
} StdVideoH265SubLayerHrdParameters;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265HrdFlags {
|
|
||||||
uint32_t nal_hrd_parameters_present_flag : 1;
|
|
||||||
uint32_t vcl_hrd_parameters_present_flag : 1;
|
|
||||||
uint32_t sub_pic_hrd_params_present_flag : 1;
|
|
||||||
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
|
|
||||||
uint32_t fixed_pic_rate_general_flag : 8;
|
|
||||||
uint32_t fixed_pic_rate_within_cvs_flag : 8;
|
|
||||||
uint32_t low_delay_hrd_flag : 8;
|
|
||||||
} StdVideoH265HrdFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265HrdParameters {
|
|
||||||
uint8_t tick_divisor_minus2;
|
|
||||||
uint8_t du_cpb_removal_delay_increment_length_minus1;
|
|
||||||
uint8_t dpb_output_delay_du_length_minus1;
|
|
||||||
uint8_t bit_rate_scale;
|
|
||||||
uint8_t cpb_size_scale;
|
|
||||||
uint8_t cpb_size_du_scale;
|
|
||||||
uint8_t initial_cpb_removal_delay_length_minus1;
|
|
||||||
uint8_t au_cpb_removal_delay_length_minus1;
|
|
||||||
uint8_t dpb_output_delay_length_minus1;
|
|
||||||
uint8_t cpb_cnt_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
uint16_t elemental_duration_in_tc_minus1[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersNal[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
StdVideoH265SubLayerHrdParameters* pSubLayerHrdParametersVcl[STD_VIDEO_H265_SUBLAYERS_MINUS1_LIST_SIZE];
|
|
||||||
StdVideoH265HrdFlags flags;
|
|
||||||
} StdVideoH265HrdParameters;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265VpsFlags {
|
|
||||||
uint32_t vps_temporal_id_nesting_flag : 1;
|
|
||||||
uint32_t vps_sub_layer_ordering_info_present_flag : 1;
|
|
||||||
uint32_t vps_timing_info_present_flag : 1;
|
|
||||||
uint32_t vps_poc_proportional_to_timing_flag : 1;
|
|
||||||
} StdVideoH265VpsFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265VideoParameterSet {
|
|
||||||
uint8_t vps_video_parameter_set_id;
|
|
||||||
uint8_t vps_max_sub_layers_minus1;
|
|
||||||
uint32_t vps_num_units_in_tick;
|
|
||||||
uint32_t vps_time_scale;
|
|
||||||
uint32_t vps_num_ticks_poc_diff_one_minus1;
|
|
||||||
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
|
||||||
StdVideoH265HrdParameters* pHrdParameters;
|
|
||||||
StdVideoH265VpsFlags flags;
|
|
||||||
} StdVideoH265VideoParameterSet;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265ScalingLists {
|
|
||||||
uint8_t ScalingList4x4[STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS];
|
|
||||||
uint8_t ScalingList8x8[STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS];
|
|
||||||
uint8_t ScalingList16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS];
|
|
||||||
uint8_t ScalingList32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS][STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS];
|
|
||||||
uint8_t ScalingListDCCoef16x16[STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS];
|
|
||||||
uint8_t ScalingListDCCoef32x32[STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS];
|
|
||||||
} StdVideoH265ScalingLists;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SpsVuiFlags {
|
|
||||||
uint32_t aspect_ratio_info_present_flag : 1;
|
|
||||||
uint32_t overscan_info_present_flag : 1;
|
|
||||||
uint32_t overscan_appropriate_flag : 1;
|
|
||||||
uint32_t video_signal_type_present_flag : 1;
|
|
||||||
uint32_t video_full_range_flag : 1;
|
|
||||||
uint32_t colour_description_present_flag : 1;
|
|
||||||
uint32_t chroma_loc_info_present_flag : 1;
|
|
||||||
uint32_t neutral_chroma_indication_flag : 1;
|
|
||||||
uint32_t field_seq_flag : 1;
|
|
||||||
uint32_t frame_field_info_present_flag : 1;
|
|
||||||
uint32_t default_display_window_flag : 1;
|
|
||||||
uint32_t vui_timing_info_present_flag : 1;
|
|
||||||
uint32_t vui_poc_proportional_to_timing_flag : 1;
|
|
||||||
uint32_t vui_hrd_parameters_present_flag : 1;
|
|
||||||
uint32_t bitstream_restriction_flag : 1;
|
|
||||||
uint32_t tiles_fixed_structure_flag : 1;
|
|
||||||
uint32_t motion_vectors_over_pic_boundaries_flag : 1;
|
|
||||||
uint32_t restricted_ref_pic_lists_flag : 1;
|
|
||||||
} StdVideoH265SpsVuiFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SequenceParameterSetVui {
|
|
||||||
uint8_t aspect_ratio_idc;
|
|
||||||
uint16_t sar_width;
|
|
||||||
uint16_t sar_height;
|
|
||||||
uint8_t video_format;
|
|
||||||
uint8_t colour_primaries;
|
|
||||||
uint8_t transfer_characteristics;
|
|
||||||
uint8_t matrix_coeffs;
|
|
||||||
uint8_t chroma_sample_loc_type_top_field;
|
|
||||||
uint8_t chroma_sample_loc_type_bottom_field;
|
|
||||||
uint16_t def_disp_win_left_offset;
|
|
||||||
uint16_t def_disp_win_right_offset;
|
|
||||||
uint16_t def_disp_win_top_offset;
|
|
||||||
uint16_t def_disp_win_bottom_offset;
|
|
||||||
uint32_t vui_num_units_in_tick;
|
|
||||||
uint32_t vui_time_scale;
|
|
||||||
uint32_t vui_num_ticks_poc_diff_one_minus1;
|
|
||||||
StdVideoH265HrdParameters* pHrdParameters;
|
|
||||||
uint16_t min_spatial_segmentation_idc;
|
|
||||||
uint8_t max_bytes_per_pic_denom;
|
|
||||||
uint8_t max_bits_per_min_cu_denom;
|
|
||||||
uint8_t log2_max_mv_length_horizontal;
|
|
||||||
uint8_t log2_max_mv_length_vertical;
|
|
||||||
StdVideoH265SpsVuiFlags flags;
|
|
||||||
} StdVideoH265SequenceParameterSetVui;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265PredictorPaletteEntries {
|
|
||||||
uint16_t PredictorPaletteEntries[STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE][STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE];
|
|
||||||
} StdVideoH265PredictorPaletteEntries;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SpsFlags {
|
|
||||||
uint32_t sps_temporal_id_nesting_flag : 1;
|
|
||||||
uint32_t separate_colour_plane_flag : 1;
|
|
||||||
uint32_t scaling_list_enabled_flag : 1;
|
|
||||||
uint32_t sps_scaling_list_data_present_flag : 1;
|
|
||||||
uint32_t amp_enabled_flag : 1;
|
|
||||||
uint32_t sample_adaptive_offset_enabled_flag : 1;
|
|
||||||
uint32_t pcm_enabled_flag : 1;
|
|
||||||
uint32_t pcm_loop_filter_disabled_flag : 1;
|
|
||||||
uint32_t long_term_ref_pics_present_flag : 1;
|
|
||||||
uint32_t sps_temporal_mvp_enabled_flag : 1;
|
|
||||||
uint32_t strong_intra_smoothing_enabled_flag : 1;
|
|
||||||
uint32_t vui_parameters_present_flag : 1;
|
|
||||||
uint32_t sps_extension_present_flag : 1;
|
|
||||||
uint32_t sps_range_extension_flag : 1;
|
|
||||||
uint32_t transform_skip_rotation_enabled_flag : 1;
|
|
||||||
uint32_t transform_skip_context_enabled_flag : 1;
|
|
||||||
uint32_t implicit_rdpcm_enabled_flag : 1;
|
|
||||||
uint32_t explicit_rdpcm_enabled_flag : 1;
|
|
||||||
uint32_t extended_precision_processing_flag : 1;
|
|
||||||
uint32_t intra_smoothing_disabled_flag : 1;
|
|
||||||
uint32_t high_precision_offsets_enabled_flag : 1;
|
|
||||||
uint32_t persistent_rice_adaptation_enabled_flag : 1;
|
|
||||||
uint32_t cabac_bypass_alignment_enabled_flag : 1;
|
|
||||||
uint32_t sps_curr_pic_ref_enabled_flag : 1;
|
|
||||||
uint32_t palette_mode_enabled_flag : 1;
|
|
||||||
uint32_t sps_palette_predictor_initializer_present_flag : 1;
|
|
||||||
uint32_t intra_boundary_filtering_disabled_flag : 1;
|
|
||||||
} StdVideoH265SpsFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265SequenceParameterSet {
|
|
||||||
StdVideoH265ProfileIdc profile_idc;
|
|
||||||
StdVideoH265Level level_idc;
|
|
||||||
uint32_t pic_width_in_luma_samples;
|
|
||||||
uint32_t pic_height_in_luma_samples;
|
|
||||||
uint8_t sps_video_parameter_set_id;
|
|
||||||
uint8_t sps_max_sub_layers_minus1;
|
|
||||||
uint8_t sps_seq_parameter_set_id;
|
|
||||||
uint8_t chroma_format_idc;
|
|
||||||
uint8_t bit_depth_luma_minus8;
|
|
||||||
uint8_t bit_depth_chroma_minus8;
|
|
||||||
uint8_t log2_max_pic_order_cnt_lsb_minus4;
|
|
||||||
uint8_t sps_max_dec_pic_buffering_minus1;
|
|
||||||
uint8_t log2_min_luma_coding_block_size_minus3;
|
|
||||||
uint8_t log2_diff_max_min_luma_coding_block_size;
|
|
||||||
uint8_t log2_min_luma_transform_block_size_minus2;
|
|
||||||
uint8_t log2_diff_max_min_luma_transform_block_size;
|
|
||||||
uint8_t max_transform_hierarchy_depth_inter;
|
|
||||||
uint8_t max_transform_hierarchy_depth_intra;
|
|
||||||
uint8_t num_short_term_ref_pic_sets;
|
|
||||||
uint8_t num_long_term_ref_pics_sps;
|
|
||||||
uint8_t pcm_sample_bit_depth_luma_minus1;
|
|
||||||
uint8_t pcm_sample_bit_depth_chroma_minus1;
|
|
||||||
uint8_t log2_min_pcm_luma_coding_block_size_minus3;
|
|
||||||
uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
|
|
||||||
uint32_t conf_win_left_offset;
|
|
||||||
uint32_t conf_win_right_offset;
|
|
||||||
uint32_t conf_win_top_offset;
|
|
||||||
uint32_t conf_win_bottom_offset;
|
|
||||||
StdVideoH265DecPicBufMgr* pDecPicBufMgr;
|
|
||||||
StdVideoH265SpsFlags flags;
|
|
||||||
StdVideoH265ScalingLists* pScalingLists;
|
|
||||||
StdVideoH265SequenceParameterSetVui* pSequenceParameterSetVui;
|
|
||||||
uint8_t palette_max_size;
|
|
||||||
uint8_t delta_palette_max_predictor_size;
|
|
||||||
uint8_t motion_vector_resolution_control_idc;
|
|
||||||
uint8_t sps_num_palette_predictor_initializer_minus1;
|
|
||||||
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
|
||||||
} StdVideoH265SequenceParameterSet;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265PpsFlags {
|
|
||||||
uint32_t dependent_slice_segments_enabled_flag : 1;
|
|
||||||
uint32_t output_flag_present_flag : 1;
|
|
||||||
uint32_t sign_data_hiding_enabled_flag : 1;
|
|
||||||
uint32_t cabac_init_present_flag : 1;
|
|
||||||
uint32_t constrained_intra_pred_flag : 1;
|
|
||||||
uint32_t transform_skip_enabled_flag : 1;
|
|
||||||
uint32_t cu_qp_delta_enabled_flag : 1;
|
|
||||||
uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
|
|
||||||
uint32_t weighted_pred_flag : 1;
|
|
||||||
uint32_t weighted_bipred_flag : 1;
|
|
||||||
uint32_t transquant_bypass_enabled_flag : 1;
|
|
||||||
uint32_t tiles_enabled_flag : 1;
|
|
||||||
uint32_t entropy_coding_sync_enabled_flag : 1;
|
|
||||||
uint32_t uniform_spacing_flag : 1;
|
|
||||||
uint32_t loop_filter_across_tiles_enabled_flag : 1;
|
|
||||||
uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
|
|
||||||
uint32_t deblocking_filter_control_present_flag : 1;
|
|
||||||
uint32_t deblocking_filter_override_enabled_flag : 1;
|
|
||||||
uint32_t pps_deblocking_filter_disabled_flag : 1;
|
|
||||||
uint32_t pps_scaling_list_data_present_flag : 1;
|
|
||||||
uint32_t lists_modification_present_flag : 1;
|
|
||||||
uint32_t slice_segment_header_extension_present_flag : 1;
|
|
||||||
uint32_t pps_extension_present_flag : 1;
|
|
||||||
uint32_t cross_component_prediction_enabled_flag : 1;
|
|
||||||
uint32_t chroma_qp_offset_list_enabled_flag : 1;
|
|
||||||
uint32_t pps_curr_pic_ref_enabled_flag : 1;
|
|
||||||
uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
|
|
||||||
uint32_t pps_slice_act_qp_offsets_present_flag : 1;
|
|
||||||
uint32_t pps_palette_predictor_initializer_present_flag : 1;
|
|
||||||
uint32_t monochrome_palette_flag : 1;
|
|
||||||
uint32_t pps_range_extension_flag : 1;
|
|
||||||
} StdVideoH265PpsFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoH265PictureParameterSet {
|
|
||||||
uint8_t pps_pic_parameter_set_id;
|
|
||||||
uint8_t pps_seq_parameter_set_id;
|
|
||||||
uint8_t num_extra_slice_header_bits;
|
|
||||||
uint8_t num_ref_idx_l0_default_active_minus1;
|
|
||||||
uint8_t num_ref_idx_l1_default_active_minus1;
|
|
||||||
int8_t init_qp_minus26;
|
|
||||||
uint8_t diff_cu_qp_delta_depth;
|
|
||||||
int8_t pps_cb_qp_offset;
|
|
||||||
int8_t pps_cr_qp_offset;
|
|
||||||
uint8_t num_tile_columns_minus1;
|
|
||||||
uint8_t num_tile_rows_minus1;
|
|
||||||
uint16_t column_width_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE];
|
|
||||||
uint16_t row_height_minus1[STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE];
|
|
||||||
int8_t pps_beta_offset_div2;
|
|
||||||
int8_t pps_tc_offset_div2;
|
|
||||||
uint8_t log2_parallel_merge_level_minus2;
|
|
||||||
StdVideoH265PpsFlags flags;
|
|
||||||
StdVideoH265ScalingLists* pScalingLists;
|
|
||||||
uint8_t log2_max_transform_skip_block_size_minus2;
|
|
||||||
uint8_t diff_cu_chroma_qp_offset_depth;
|
|
||||||
uint8_t chroma_qp_offset_list_len_minus1;
|
|
||||||
int8_t cb_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
|
||||||
int8_t cr_qp_offset_list[STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE];
|
|
||||||
uint8_t log2_sao_offset_scale_luma;
|
|
||||||
uint8_t log2_sao_offset_scale_chroma;
|
|
||||||
int8_t pps_act_y_qp_offset_plus5;
|
|
||||||
int8_t pps_act_cb_qp_offset_plus5;
|
|
||||||
int8_t pps_act_cr_qp_offset_plus5;
|
|
||||||
uint8_t pps_num_palette_predictor_initializer;
|
|
||||||
uint8_t luma_bit_depth_entry_minus8;
|
|
||||||
uint8_t chroma_bit_depth_entry_minus8;
|
|
||||||
StdVideoH265PredictorPaletteEntries* pPredictorPaletteEntries;
|
|
||||||
} StdVideoH265PictureParameterSet;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,60 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_DECODE_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h265std_decode 1
|
|
||||||
#define STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE 8
|
|
||||||
typedef struct StdVideoDecodeH265PictureInfoFlags {
|
|
||||||
uint32_t IrapPicFlag : 1;
|
|
||||||
uint32_t IdrPicFlag : 1;
|
|
||||||
uint32_t IsReference : 1;
|
|
||||||
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
|
||||||
} StdVideoDecodeH265PictureInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265PictureInfo {
|
|
||||||
uint8_t vps_video_parameter_set_id;
|
|
||||||
uint8_t sps_seq_parameter_set_id;
|
|
||||||
uint8_t pps_pic_parameter_set_id;
|
|
||||||
uint8_t num_short_term_ref_pic_sets;
|
|
||||||
int32_t PicOrderCntVal;
|
|
||||||
uint16_t NumBitsForSTRefPicSetInSlice;
|
|
||||||
uint8_t NumDeltaPocsOfRefRpsIdx;
|
|
||||||
uint8_t RefPicSetStCurrBefore[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
|
||||||
uint8_t RefPicSetStCurrAfter[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
|
||||||
uint8_t RefPicSetLtCurr[STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE];
|
|
||||||
StdVideoDecodeH265PictureInfoFlags flags;
|
|
||||||
} StdVideoDecodeH265PictureInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265ReferenceInfoFlags {
|
|
||||||
uint32_t is_long_term : 1;
|
|
||||||
uint32_t is_non_existing : 1;
|
|
||||||
} StdVideoDecodeH265ReferenceInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoDecodeH265ReferenceInfo {
|
|
||||||
int32_t PicOrderCntVal;
|
|
||||||
StdVideoDecodeH265ReferenceInfoFlags flags;
|
|
||||||
} StdVideoDecodeH265ReferenceInfo;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,124 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_
|
|
||||||
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codec_h265std_encode 1
|
|
||||||
#define STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE 15
|
|
||||||
#define STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE 15
|
|
||||||
#define STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM 2
|
|
||||||
typedef struct StdVideoEncodeH265SliceSegmentHeaderFlags {
|
|
||||||
uint32_t first_slice_segment_in_pic_flag : 1;
|
|
||||||
uint32_t no_output_of_prior_pics_flag : 1;
|
|
||||||
uint32_t dependent_slice_segment_flag : 1;
|
|
||||||
uint32_t short_term_ref_pic_set_sps_flag : 1;
|
|
||||||
uint32_t slice_temporal_mvp_enable_flag : 1;
|
|
||||||
uint32_t slice_sao_luma_flag : 1;
|
|
||||||
uint32_t slice_sao_chroma_flag : 1;
|
|
||||||
uint32_t num_ref_idx_active_override_flag : 1;
|
|
||||||
uint32_t mvd_l1_zero_flag : 1;
|
|
||||||
uint32_t cabac_init_flag : 1;
|
|
||||||
uint32_t slice_deblocking_filter_disable_flag : 1;
|
|
||||||
uint32_t collocated_from_l0_flag : 1;
|
|
||||||
uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
|
|
||||||
uint32_t bLastSliceInPic : 1;
|
|
||||||
uint32_t reservedBits : 18;
|
|
||||||
uint16_t luma_weight_l0_flag;
|
|
||||||
uint16_t chroma_weight_l0_flag;
|
|
||||||
uint16_t luma_weight_l1_flag;
|
|
||||||
uint16_t chroma_weight_l1_flag;
|
|
||||||
} StdVideoEncodeH265SliceSegmentHeaderFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265SliceSegmentHeader {
|
|
||||||
StdVideoH265SliceType slice_type;
|
|
||||||
uint8_t slice_pic_parameter_set_id;
|
|
||||||
uint8_t num_short_term_ref_pic_sets;
|
|
||||||
uint32_t slice_segment_address;
|
|
||||||
uint8_t short_term_ref_pic_set_idx;
|
|
||||||
uint8_t num_long_term_sps;
|
|
||||||
uint8_t num_long_term_pics;
|
|
||||||
uint8_t collocated_ref_idx;
|
|
||||||
uint8_t num_ref_idx_l0_active_minus1;
|
|
||||||
uint8_t num_ref_idx_l1_active_minus1;
|
|
||||||
uint8_t luma_log2_weight_denom;
|
|
||||||
int8_t delta_chroma_log2_weight_denom;
|
|
||||||
int8_t delta_luma_weight_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
|
||||||
int8_t luma_offset_l0[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
|
||||||
int8_t delta_chroma_weight_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
|
||||||
int8_t delta_chroma_offset_l0[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
|
||||||
int8_t delta_luma_weight_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
|
||||||
int8_t luma_offset_l1[STD_VIDEO_ENCODE_H265_LUMA_LIST_SIZE];
|
|
||||||
int8_t delta_chroma_weight_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
|
||||||
int8_t delta_chroma_offset_l1[STD_VIDEO_ENCODE_H265_CHROMA_LIST_SIZE][STD_VIDEO_ENCODE_H265_CHROMA_LISTS_NUM];
|
|
||||||
uint8_t MaxNumMergeCand;
|
|
||||||
int8_t slice_cb_qp_offset;
|
|
||||||
int8_t slice_cr_qp_offset;
|
|
||||||
int8_t slice_beta_offset_div2;
|
|
||||||
int8_t slice_tc_offset_div2;
|
|
||||||
int8_t slice_act_y_qp_offset;
|
|
||||||
int8_t slice_act_cb_qp_offset;
|
|
||||||
int8_t slice_act_cr_qp_offset;
|
|
||||||
StdVideoEncodeH265SliceSegmentHeaderFlags flags;
|
|
||||||
} StdVideoEncodeH265SliceSegmentHeader;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265ReferenceModificationFlags {
|
|
||||||
uint32_t ref_pic_list_modification_flag_l0 : 1;
|
|
||||||
uint32_t ref_pic_list_modification_flag_l1 : 1;
|
|
||||||
} StdVideoEncodeH265ReferenceModificationFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265ReferenceModifications {
|
|
||||||
StdVideoEncodeH265ReferenceModificationFlags flags;
|
|
||||||
uint8_t referenceList0ModificationsCount;
|
|
||||||
uint8_t* pReferenceList0Modifications;
|
|
||||||
uint8_t referenceList1ModificationsCount;
|
|
||||||
uint8_t* pReferenceList1Modifications;
|
|
||||||
} StdVideoEncodeH265ReferenceModifications;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265PictureInfoFlags {
|
|
||||||
uint32_t is_reference_flag : 1;
|
|
||||||
uint32_t IrapPicFlag : 1;
|
|
||||||
uint32_t long_term_flag : 1;
|
|
||||||
} StdVideoEncodeH265PictureInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265PictureInfo {
|
|
||||||
StdVideoH265PictureType PictureType;
|
|
||||||
uint8_t sps_video_parameter_set_id;
|
|
||||||
uint8_t pps_seq_parameter_set_id;
|
|
||||||
int32_t PicOrderCntVal;
|
|
||||||
uint8_t TemporalId;
|
|
||||||
StdVideoEncodeH265PictureInfoFlags flags;
|
|
||||||
} StdVideoEncodeH265PictureInfo;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265ReferenceInfoFlags {
|
|
||||||
uint32_t is_long_term : 1;
|
|
||||||
uint32_t isUsedFlag : 1;
|
|
||||||
} StdVideoEncodeH265ReferenceInfoFlags;
|
|
||||||
|
|
||||||
typedef struct StdVideoEncodeH265ReferenceInfo {
|
|
||||||
int32_t PicOrderCntVal;
|
|
||||||
uint8_t TemporalId;
|
|
||||||
StdVideoEncodeH265ReferenceInfoFlags flags;
|
|
||||||
} StdVideoEncodeH265ReferenceInfo;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||||||
#ifndef VULKAN_VIDEO_CODECS_COMMON_H_
|
|
||||||
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define vulkan_video_codecs_common 1
|
|
||||||
#define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \
|
|
||||||
((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,84 +0,0 @@
|
|||||||
//
|
|
||||||
// File: vk_platform.h
|
|
||||||
//
|
|
||||||
/*
|
|
||||||
** Copyright 2014-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef VK_PLATFORM_H_
|
|
||||||
#define VK_PLATFORM_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
/*
|
|
||||||
***************************************************************************************************
|
|
||||||
* Platform-specific directives and type declarations
|
|
||||||
***************************************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Platform-specific calling convention macros.
|
|
||||||
*
|
|
||||||
* Platforms should define these so that Vulkan clients call Vulkan commands
|
|
||||||
* with the same calling conventions that the Vulkan implementation expects.
|
|
||||||
*
|
|
||||||
* VKAPI_ATTR - Placed before the return type in function declarations.
|
|
||||||
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
|
||||||
* VKAPI_CALL - Placed after the return type in function declarations.
|
|
||||||
* Useful for MSVC-style calling convention syntax.
|
|
||||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
|
||||||
*
|
|
||||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
|
||||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
|
||||||
*/
|
|
||||||
#if defined(_WIN32)
|
|
||||||
// On Windows, Vulkan commands use the stdcall convention
|
|
||||||
#define VKAPI_ATTR
|
|
||||||
#define VKAPI_CALL __stdcall
|
|
||||||
#define VKAPI_PTR VKAPI_CALL
|
|
||||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
|
||||||
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
|
|
||||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
|
||||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
|
||||||
// calling convention, i.e. float parameters are passed in registers. This
|
|
||||||
// is true even if the rest of the application passes floats on the stack,
|
|
||||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
|
||||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
|
||||||
#define VKAPI_CALL
|
|
||||||
#define VKAPI_PTR VKAPI_ATTR
|
|
||||||
#else
|
|
||||||
// On other platforms, use the default calling convention
|
|
||||||
#define VKAPI_ATTR
|
|
||||||
#define VKAPI_CALL
|
|
||||||
#define VKAPI_PTR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(VK_NO_STDDEF_H)
|
|
||||||
#include <stddef.h>
|
|
||||||
#endif // !defined(VK_NO_STDDEF_H)
|
|
||||||
|
|
||||||
#if !defined(VK_NO_STDINT_H)
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
|
||||||
typedef signed __int8 int8_t;
|
|
||||||
typedef unsigned __int8 uint8_t;
|
|
||||||
typedef signed __int16 int16_t;
|
|
||||||
typedef unsigned __int16 uint16_t;
|
|
||||||
typedef signed __int32 int32_t;
|
|
||||||
typedef unsigned __int32 uint32_t;
|
|
||||||
typedef signed __int64 int64_t;
|
|
||||||
typedef unsigned __int64 uint64_t;
|
|
||||||
#else
|
|
||||||
#include <stdint.h>
|
|
||||||
#endif
|
|
||||||
#endif // !defined(VK_NO_STDINT_H)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} // extern "C"
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,92 +0,0 @@
|
|||||||
#ifndef VULKAN_H_
|
|
||||||
#define VULKAN_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "vk_platform.h"
|
|
||||||
#include "vulkan_core.h"
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
|
||||||
#include "vulkan_android.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
|
||||||
#include <zircon/types.h>
|
|
||||||
#include "vulkan_fuchsia.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
|
||||||
#include "vulkan_ios.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
|
||||||
#include "vulkan_macos.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
|
||||||
#include "vulkan_metal.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_VI_NN
|
|
||||||
#include "vulkan_vi.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
|
||||||
#include <wayland-client.h>
|
|
||||||
#include "vulkan_wayland.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
|
||||||
#include <windows.h>
|
|
||||||
#include "vulkan_win32.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
|
||||||
#include <xcb/xcb.h>
|
|
||||||
#include "vulkan_xcb.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include "vulkan_xlib.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
|
|
||||||
#include <directfb.h>
|
|
||||||
#include "vulkan_directfb.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/extensions/Xrandr.h>
|
|
||||||
#include "vulkan_xlib_xrandr.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_GGP
|
|
||||||
#include <ggp_c/vulkan_types.h>
|
|
||||||
#include "vulkan_ggp.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VK_USE_PLATFORM_SCREEN_QNX
|
|
||||||
#include <screen/screen.h>
|
|
||||||
#include "vulkan_screen.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
|
||||||
#include "vulkan_beta.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // VULKAN_H_
|
|
File diff suppressed because it is too large
Load Diff
@ -1,125 +0,0 @@
|
|||||||
#ifndef VULKAN_ANDROID_H_
|
|
||||||
#define VULKAN_ANDROID_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_android_surface 1
|
|
||||||
struct ANativeWindow;
|
|
||||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
|
||||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
|
||||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
|
||||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkAndroidSurfaceCreateFlagsKHR flags;
|
|
||||||
struct ANativeWindow* window;
|
|
||||||
} VkAndroidSurfaceCreateInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
|
||||||
struct AHardwareBuffer;
|
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 4
|
|
||||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
|
||||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
uint64_t androidHardwareBufferUsage;
|
|
||||||
} VkAndroidHardwareBufferUsageANDROID;
|
|
||||||
|
|
||||||
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
VkDeviceSize allocationSize;
|
|
||||||
uint32_t memoryTypeBits;
|
|
||||||
} VkAndroidHardwareBufferPropertiesANDROID;
|
|
||||||
|
|
||||||
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
VkFormat format;
|
|
||||||
uint64_t externalFormat;
|
|
||||||
VkFormatFeatureFlags formatFeatures;
|
|
||||||
VkComponentMapping samplerYcbcrConversionComponents;
|
|
||||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
|
||||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
|
||||||
VkChromaLocation suggestedXChromaOffset;
|
|
||||||
VkChromaLocation suggestedYChromaOffset;
|
|
||||||
} VkAndroidHardwareBufferFormatPropertiesANDROID;
|
|
||||||
|
|
||||||
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
struct AHardwareBuffer* buffer;
|
|
||||||
} VkImportAndroidHardwareBufferInfoANDROID;
|
|
||||||
|
|
||||||
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkDeviceMemory memory;
|
|
||||||
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
|
|
||||||
|
|
||||||
typedef struct VkExternalFormatANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
uint64_t externalFormat;
|
|
||||||
} VkExternalFormatANDROID;
|
|
||||||
|
|
||||||
typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
VkFormat format;
|
|
||||||
uint64_t externalFormat;
|
|
||||||
VkFormatFeatureFlags2 formatFeatures;
|
|
||||||
VkComponentMapping samplerYcbcrConversionComponents;
|
|
||||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
|
||||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
|
||||||
VkChromaLocation suggestedXChromaOffset;
|
|
||||||
VkChromaLocation suggestedYChromaOffset;
|
|
||||||
} VkAndroidHardwareBufferFormatProperties2ANDROID;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
|
|
||||||
VkDevice device,
|
|
||||||
const struct AHardwareBuffer* buffer,
|
|
||||||
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
|
||||||
VkDevice device,
|
|
||||||
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
|
|
||||||
struct AHardwareBuffer** pBuffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
|||||||
#ifndef VULKAN_DIRECTFB_H_
|
|
||||||
#define VULKAN_DIRECTFB_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_directfb_surface 1
|
|
||||||
#define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface"
|
|
||||||
typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT;
|
|
||||||
typedef struct VkDirectFBSurfaceCreateInfoEXT {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkDirectFBSurfaceCreateFlagsEXT flags;
|
|
||||||
IDirectFB* dfb;
|
|
||||||
IDirectFBSurface* surface;
|
|
||||||
} VkDirectFBSurfaceCreateInfoEXT;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex,
|
|
||||||
IDirectFB* dfb);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,258 +0,0 @@
|
|||||||
#ifndef VULKAN_FUCHSIA_H_
|
|
||||||
#define VULKAN_FUCHSIA_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_FUCHSIA_imagepipe_surface 1
|
|
||||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
|
||||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
|
||||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
|
|
||||||
zx_handle_t imagePipeHandle;
|
|
||||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_FUCHSIA_external_memory 1
|
|
||||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION 1
|
|
||||||
#define VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME "VK_FUCHSIA_external_memory"
|
|
||||||
typedef struct VkImportMemoryZirconHandleInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
|
||||||
zx_handle_t handle;
|
|
||||||
} VkImportMemoryZirconHandleInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkMemoryZirconHandlePropertiesFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
uint32_t memoryTypeBits;
|
|
||||||
} VkMemoryZirconHandlePropertiesFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkMemoryGetZirconHandleInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkDeviceMemory memory;
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
|
||||||
} VkMemoryGetZirconHandleInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandleFUCHSIA)(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
|
|
||||||
zx_handle_t* pZirconHandle);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
|
||||||
zx_handle_t zirconHandle,
|
|
||||||
VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_FUCHSIA_external_semaphore 1
|
|
||||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
|
|
||||||
#define VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_FUCHSIA_external_semaphore"
|
|
||||||
typedef struct VkImportSemaphoreZirconHandleInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkSemaphore semaphore;
|
|
||||||
VkSemaphoreImportFlags flags;
|
|
||||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
|
||||||
zx_handle_t zirconHandle;
|
|
||||||
} VkImportSemaphoreZirconHandleInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkSemaphoreGetZirconHandleInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkSemaphore semaphore;
|
|
||||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
|
||||||
} VkSemaphoreGetZirconHandleInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreZirconHandleFUCHSIA)(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo,
|
|
||||||
zx_handle_t* pZirconHandle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_FUCHSIA_buffer_collection 1
|
|
||||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA)
|
|
||||||
#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2
|
|
||||||
#define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection"
|
|
||||||
typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA;
|
|
||||||
|
|
||||||
typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA {
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001,
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002,
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004,
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008,
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010,
|
|
||||||
VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF
|
|
||||||
} VkImageConstraintsInfoFlagBitsFUCHSIA;
|
|
||||||
typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA;
|
|
||||||
typedef struct VkBufferCollectionCreateInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
zx_handle_t collectionToken;
|
|
||||||
} VkBufferCollectionCreateInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkImportMemoryBufferCollectionFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkBufferCollectionFUCHSIA collection;
|
|
||||||
uint32_t index;
|
|
||||||
} VkImportMemoryBufferCollectionFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkBufferCollectionImageCreateInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkBufferCollectionFUCHSIA collection;
|
|
||||||
uint32_t index;
|
|
||||||
} VkBufferCollectionImageCreateInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkBufferCollectionConstraintsInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t minBufferCount;
|
|
||||||
uint32_t maxBufferCount;
|
|
||||||
uint32_t minBufferCountForCamping;
|
|
||||||
uint32_t minBufferCountForDedicatedSlack;
|
|
||||||
uint32_t minBufferCountForSharedSlack;
|
|
||||||
} VkBufferCollectionConstraintsInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkBufferConstraintsInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkBufferCreateInfo createInfo;
|
|
||||||
VkFormatFeatureFlags requiredFormatFeatures;
|
|
||||||
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
|
||||||
} VkBufferConstraintsInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkBufferCollectionFUCHSIA collection;
|
|
||||||
uint32_t index;
|
|
||||||
} VkBufferCollectionBufferCreateInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkSysmemColorSpaceFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t colorSpace;
|
|
||||||
} VkSysmemColorSpaceFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkBufferCollectionPropertiesFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
uint32_t memoryTypeBits;
|
|
||||||
uint32_t bufferCount;
|
|
||||||
uint32_t createInfoIndex;
|
|
||||||
uint64_t sysmemPixelFormat;
|
|
||||||
VkFormatFeatureFlags formatFeatures;
|
|
||||||
VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex;
|
|
||||||
VkComponentMapping samplerYcbcrConversionComponents;
|
|
||||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
|
||||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
|
||||||
VkChromaLocation suggestedXChromaOffset;
|
|
||||||
VkChromaLocation suggestedYChromaOffset;
|
|
||||||
} VkBufferCollectionPropertiesFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkImageFormatConstraintsInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkImageCreateInfo imageCreateInfo;
|
|
||||||
VkFormatFeatureFlags requiredFormatFeatures;
|
|
||||||
VkImageFormatConstraintsFlagsFUCHSIA flags;
|
|
||||||
uint64_t sysmemPixelFormat;
|
|
||||||
uint32_t colorSpaceCount;
|
|
||||||
const VkSysmemColorSpaceFUCHSIA* pColorSpaces;
|
|
||||||
} VkImageFormatConstraintsInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef struct VkImageConstraintsInfoFUCHSIA {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t formatConstraintsCount;
|
|
||||||
const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints;
|
|
||||||
VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints;
|
|
||||||
VkImageConstraintsInfoFlagsFUCHSIA flags;
|
|
||||||
} VkImageConstraintsInfoFUCHSIA;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
|
||||||
typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkBufferCollectionFUCHSIA* pCollection);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
VkBufferCollectionFUCHSIA collection,
|
|
||||||
const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
VkBufferCollectionFUCHSIA collection,
|
|
||||||
const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo);
|
|
||||||
|
|
||||||
VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
VkBufferCollectionFUCHSIA collection,
|
|
||||||
const VkAllocationCallbacks* pAllocator);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(
|
|
||||||
VkDevice device,
|
|
||||||
VkBufferCollectionFUCHSIA collection,
|
|
||||||
VkBufferCollectionPropertiesFUCHSIA* pProperties);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
|||||||
#ifndef VULKAN_GGP_H_
|
|
||||||
#define VULKAN_GGP_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_GGP_stream_descriptor_surface 1
|
|
||||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
|
||||||
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
|
|
||||||
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
|
|
||||||
GgpStreamDescriptor streamDescriptor;
|
|
||||||
} VkStreamDescriptorSurfaceCreateInfoGGP;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_GGP_frame_token 1
|
|
||||||
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
|
||||||
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
|
||||||
typedef struct VkPresentFrameTokenGGP {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
GgpFrameToken frameToken;
|
|
||||||
} VkPresentFrameTokenGGP;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
|||||||
#ifndef VULKAN_IOS_H_
|
|
||||||
#define VULKAN_IOS_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_MVK_ios_surface 1
|
|
||||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
|
|
||||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
|
||||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
|
||||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkIOSSurfaceCreateFlagsMVK flags;
|
|
||||||
const void* pView;
|
|
||||||
} VkIOSSurfaceCreateInfoMVK;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,47 +0,0 @@
|
|||||||
#ifndef VULKAN_MACOS_H_
|
|
||||||
#define VULKAN_MACOS_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_MVK_macos_surface 1
|
|
||||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3
|
|
||||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
|
||||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
|
||||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkMacOSSurfaceCreateFlagsMVK flags;
|
|
||||||
const void* pView;
|
|
||||||
} VkMacOSSurfaceCreateInfoMVK;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,54 +0,0 @@
|
|||||||
#ifndef VULKAN_METAL_H_
|
|
||||||
#define VULKAN_METAL_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_metal_surface 1
|
|
||||||
|
|
||||||
#ifdef __OBJC__
|
|
||||||
@class CAMetalLayer;
|
|
||||||
#else
|
|
||||||
typedef void CAMetalLayer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
|
||||||
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
|
||||||
typedef struct VkMetalSurfaceCreateInfoEXT {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkMetalSurfaceCreateFlagsEXT flags;
|
|
||||||
const CAMetalLayer* pLayer;
|
|
||||||
} VkMetalSurfaceCreateInfoEXT;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,54 +0,0 @@
|
|||||||
#ifndef VULKAN_SCREEN_H_
|
|
||||||
#define VULKAN_SCREEN_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_QNX_screen_surface 1
|
|
||||||
#define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface"
|
|
||||||
typedef VkFlags VkScreenSurfaceCreateFlagsQNX;
|
|
||||||
typedef struct VkScreenSurfaceCreateInfoQNX {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkScreenSurfaceCreateFlagsQNX flags;
|
|
||||||
struct _screen_context* context;
|
|
||||||
struct _screen_window* window;
|
|
||||||
} VkScreenSurfaceCreateInfoQNX;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkScreenSurfaceCreateInfoQNX* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex,
|
|
||||||
struct _screen_window* window);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
|||||||
#ifndef VULKAN_VI_H_
|
|
||||||
#define VULKAN_VI_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_NN_vi_surface 1
|
|
||||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
|
||||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
|
||||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
|
||||||
typedef struct VkViSurfaceCreateInfoNN {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkViSurfaceCreateFlagsNN flags;
|
|
||||||
void* window;
|
|
||||||
} VkViSurfaceCreateInfoNN;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,54 +0,0 @@
|
|||||||
#ifndef VULKAN_WAYLAND_H_
|
|
||||||
#define VULKAN_WAYLAND_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_wayland_surface 1
|
|
||||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
|
||||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
|
||||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
|
||||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkWaylandSurfaceCreateFlagsKHR flags;
|
|
||||||
struct wl_display* display;
|
|
||||||
struct wl_surface* surface;
|
|
||||||
} VkWaylandSurfaceCreateInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex,
|
|
||||||
struct wl_display* display);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,315 +0,0 @@
|
|||||||
#ifndef VULKAN_WIN32_H_
|
|
||||||
#define VULKAN_WIN32_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_win32_surface 1
|
|
||||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
|
||||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
|
||||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
|
||||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkWin32SurfaceCreateFlagsKHR flags;
|
|
||||||
HINSTANCE hinstance;
|
|
||||||
HWND hwnd;
|
|
||||||
} VkWin32SurfaceCreateInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_external_memory_win32 1
|
|
||||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
|
||||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
|
||||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
|
||||||
HANDLE handle;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkImportMemoryWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkExportMemoryWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
const SECURITY_ATTRIBUTES* pAttributes;
|
|
||||||
DWORD dwAccess;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkExportMemoryWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkMemoryWin32HandlePropertiesKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
uint32_t memoryTypeBits;
|
|
||||||
} VkMemoryWin32HandlePropertiesKHR;
|
|
||||||
|
|
||||||
typedef struct VkMemoryGetWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkDeviceMemory memory;
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
|
||||||
} VkMemoryGetWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
|
||||||
VkDevice device,
|
|
||||||
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
||||||
HANDLE* pHandle);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
|
||||||
VkDevice device,
|
|
||||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
|
||||||
HANDLE handle,
|
|
||||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_win32_keyed_mutex 1
|
|
||||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
|
||||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
|
||||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t acquireCount;
|
|
||||||
const VkDeviceMemory* pAcquireSyncs;
|
|
||||||
const uint64_t* pAcquireKeys;
|
|
||||||
const uint32_t* pAcquireTimeouts;
|
|
||||||
uint32_t releaseCount;
|
|
||||||
const VkDeviceMemory* pReleaseSyncs;
|
|
||||||
const uint64_t* pReleaseKeys;
|
|
||||||
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_external_semaphore_win32 1
|
|
||||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
|
||||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
|
||||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkSemaphore semaphore;
|
|
||||||
VkSemaphoreImportFlags flags;
|
|
||||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
|
||||||
HANDLE handle;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkImportSemaphoreWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
const SECURITY_ATTRIBUTES* pAttributes;
|
|
||||||
DWORD dwAccess;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkExportSemaphoreWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkD3D12FenceSubmitInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t waitSemaphoreValuesCount;
|
|
||||||
const uint64_t* pWaitSemaphoreValues;
|
|
||||||
uint32_t signalSemaphoreValuesCount;
|
|
||||||
const uint64_t* pSignalSemaphoreValues;
|
|
||||||
} VkD3D12FenceSubmitInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkSemaphore semaphore;
|
|
||||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
|
||||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
|
||||||
VkDevice device,
|
|
||||||
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
|
||||||
VkDevice device,
|
|
||||||
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
||||||
HANDLE* pHandle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_external_fence_win32 1
|
|
||||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
|
||||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
|
||||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkFence fence;
|
|
||||||
VkFenceImportFlags flags;
|
|
||||||
VkExternalFenceHandleTypeFlagBits handleType;
|
|
||||||
HANDLE handle;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkImportFenceWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkExportFenceWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
const SECURITY_ATTRIBUTES* pAttributes;
|
|
||||||
DWORD dwAccess;
|
|
||||||
LPCWSTR name;
|
|
||||||
} VkExportFenceWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef struct VkFenceGetWin32HandleInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkFence fence;
|
|
||||||
VkExternalFenceHandleTypeFlagBits handleType;
|
|
||||||
} VkFenceGetWin32HandleInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
|
||||||
VkDevice device,
|
|
||||||
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
|
||||||
VkDevice device,
|
|
||||||
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
||||||
HANDLE* pHandle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_NV_external_memory_win32 1
|
|
||||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
|
||||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
|
||||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkExternalMemoryHandleTypeFlagsNV handleType;
|
|
||||||
HANDLE handle;
|
|
||||||
} VkImportMemoryWin32HandleInfoNV;
|
|
||||||
|
|
||||||
typedef struct VkExportMemoryWin32HandleInfoNV {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
const SECURITY_ATTRIBUTES* pAttributes;
|
|
||||||
DWORD dwAccess;
|
|
||||||
} VkExportMemoryWin32HandleInfoNV;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
|
||||||
VkDevice device,
|
|
||||||
VkDeviceMemory memory,
|
|
||||||
VkExternalMemoryHandleTypeFlagsNV handleType,
|
|
||||||
HANDLE* pHandle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_NV_win32_keyed_mutex 1
|
|
||||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
|
|
||||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
|
||||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
uint32_t acquireCount;
|
|
||||||
const VkDeviceMemory* pAcquireSyncs;
|
|
||||||
const uint64_t* pAcquireKeys;
|
|
||||||
const uint32_t* pAcquireTimeoutMilliseconds;
|
|
||||||
uint32_t releaseCount;
|
|
||||||
const VkDeviceMemory* pReleaseSyncs;
|
|
||||||
const uint64_t* pReleaseKeys;
|
|
||||||
} VkWin32KeyedMutexAcquireReleaseInfoNV;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_full_screen_exclusive 1
|
|
||||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
|
|
||||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
|
|
||||||
|
|
||||||
typedef enum VkFullScreenExclusiveEXT {
|
|
||||||
VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
|
|
||||||
VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
|
|
||||||
VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
|
|
||||||
VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
|
|
||||||
VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
|
|
||||||
} VkFullScreenExclusiveEXT;
|
|
||||||
typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
VkFullScreenExclusiveEXT fullScreenExclusive;
|
|
||||||
} VkSurfaceFullScreenExclusiveInfoEXT;
|
|
||||||
|
|
||||||
typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
|
|
||||||
VkStructureType sType;
|
|
||||||
void* pNext;
|
|
||||||
VkBool32 fullScreenExclusiveSupported;
|
|
||||||
} VkSurfaceCapabilitiesFullScreenExclusiveEXT;
|
|
||||||
|
|
||||||
typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
HMONITOR hmonitor;
|
|
||||||
} VkSurfaceFullScreenExclusiveWin32InfoEXT;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
|
||||||
uint32_t* pPresentModeCount,
|
|
||||||
VkPresentModeKHR* pPresentModes);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
|
|
||||||
VkDevice device,
|
|
||||||
VkSwapchainKHR swapchain);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
|
|
||||||
VkDevice device,
|
|
||||||
VkSwapchainKHR swapchain);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
|
||||||
VkDevice device,
|
|
||||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
|
||||||
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,55 +0,0 @@
|
|||||||
#ifndef VULKAN_XCB_H_
|
|
||||||
#define VULKAN_XCB_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_xcb_surface 1
|
|
||||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
|
||||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
|
||||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
|
||||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkXcbSurfaceCreateFlagsKHR flags;
|
|
||||||
xcb_connection_t* connection;
|
|
||||||
xcb_window_t window;
|
|
||||||
} VkXcbSurfaceCreateInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex,
|
|
||||||
xcb_connection_t* connection,
|
|
||||||
xcb_visualid_t visual_id);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,55 +0,0 @@
|
|||||||
#ifndef VULKAN_XLIB_H_
|
|
||||||
#define VULKAN_XLIB_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_KHR_xlib_surface 1
|
|
||||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
|
||||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
|
||||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
|
||||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
|
||||||
VkStructureType sType;
|
|
||||||
const void* pNext;
|
|
||||||
VkXlibSurfaceCreateFlagsKHR flags;
|
|
||||||
Display* dpy;
|
|
||||||
Window window;
|
|
||||||
} VkXlibSurfaceCreateInfoKHR;
|
|
||||||
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
||||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
|
||||||
VkInstance instance,
|
|
||||||
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkSurfaceKHR* pSurface);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
uint32_t queueFamilyIndex,
|
|
||||||
Display* dpy,
|
|
||||||
VisualID visualID);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||||||
#ifndef VULKAN_XLIB_XRANDR_H_
|
|
||||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Copyright 2015-2022 The Khronos Group Inc.
|
|
||||||
**
|
|
||||||
** SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define VK_EXT_acquire_xlib_display 1
|
|
||||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
|
||||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
|
||||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
|
||||||
|
|
||||||
#ifndef VK_NO_PROTOTYPES
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
Display* dpy,
|
|
||||||
VkDisplayKHR display);
|
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
|
||||||
VkPhysicalDevice physicalDevice,
|
|
||||||
Display* dpy,
|
|
||||||
RROutput rrOutput,
|
|
||||||
VkDisplayKHR* pDisplay);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/usr/bin/python3 -i
|
|
||||||
#
|
|
||||||
# Copyright 2021-2022 The Khronos Group Inc.
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
# Generic alias for working group-specific API conventions interface.
|
|
||||||
|
|
||||||
# This import should be changed at the repository / working group level to
|
|
||||||
# specify the correct API's conventions.
|
|
||||||
|
|
||||||
from vkconventions import VulkanConventions as APIConventions
|
|
@ -1,424 +0,0 @@
|
|||||||
#!/usr/bin/python3 -i
|
|
||||||
#
|
|
||||||
# Copyright 2013-2022 The Khronos Group Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
from generator import (GeneratorOptions, OutputGenerator, noneStr,
|
|
||||||
regSortFeatures, write)
|
|
||||||
|
|
||||||
|
|
||||||
class CGeneratorOptions(GeneratorOptions):
|
|
||||||
"""CGeneratorOptions - subclass of GeneratorOptions.
|
|
||||||
|
|
||||||
Adds options used by COutputGenerator objects during C language header
|
|
||||||
generation."""
|
|
||||||
|
|
||||||
def __init__(self,
|
|
||||||
prefixText="",
|
|
||||||
genFuncPointers=True,
|
|
||||||
protectFile=True,
|
|
||||||
protectFeature=True,
|
|
||||||
protectProto=None,
|
|
||||||
protectProtoStr=None,
|
|
||||||
apicall='',
|
|
||||||
apientry='',
|
|
||||||
apientryp='',
|
|
||||||
indentFuncProto=True,
|
|
||||||
indentFuncPointer=False,
|
|
||||||
alignFuncParam=0,
|
|
||||||
genEnumBeginEndRange=False,
|
|
||||||
genAliasMacro=False,
|
|
||||||
aliasMacro='',
|
|
||||||
misracstyle=False,
|
|
||||||
misracppstyle=False,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Constructor.
|
|
||||||
Additional parameters beyond parent class:
|
|
||||||
|
|
||||||
- prefixText - list of strings to prefix generated header with
|
|
||||||
(usually a copyright statement + calling convention macros).
|
|
||||||
- protectFile - True if multiple inclusion protection should be
|
|
||||||
generated (based on the filename) around the entire header.
|
|
||||||
- protectFeature - True if #ifndef..#endif protection should be
|
|
||||||
generated around a feature interface in the header file.
|
|
||||||
- genFuncPointers - True if function pointer typedefs should be
|
|
||||||
generated
|
|
||||||
- protectProto - If conditional protection should be generated
|
|
||||||
around prototype declarations, set to either '#ifdef'
|
|
||||||
to require opt-in (#ifdef protectProtoStr) or '#ifndef'
|
|
||||||
to require opt-out (#ifndef protectProtoStr). Otherwise
|
|
||||||
set to None.
|
|
||||||
- protectProtoStr - #ifdef/#ifndef symbol to use around prototype
|
|
||||||
declarations, if protectProto is set
|
|
||||||
- apicall - string to use for the function declaration prefix,
|
|
||||||
such as APICALL on Windows.
|
|
||||||
- apientry - string to use for the calling convention macro,
|
|
||||||
in typedefs, such as APIENTRY.
|
|
||||||
- apientryp - string to use for the calling convention macro
|
|
||||||
in function pointer typedefs, such as APIENTRYP.
|
|
||||||
- indentFuncProto - True if prototype declarations should put each
|
|
||||||
parameter on a separate line
|
|
||||||
- indentFuncPointer - True if typedefed function pointers should put each
|
|
||||||
parameter on a separate line
|
|
||||||
- alignFuncParam - if nonzero and parameters are being put on a
|
|
||||||
separate line, align parameter names at the specified column
|
|
||||||
- genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should
|
|
||||||
be generated for enumerated types
|
|
||||||
- genAliasMacro - True if the OpenXR alias macro should be generated
|
|
||||||
for aliased types (unclear what other circumstances this is useful)
|
|
||||||
- aliasMacro - alias macro to inject when genAliasMacro is True
|
|
||||||
- misracstyle - generate MISRA C-friendly headers
|
|
||||||
- misracppstyle - generate MISRA C++-friendly headers"""
|
|
||||||
|
|
||||||
GeneratorOptions.__init__(self, **kwargs)
|
|
||||||
|
|
||||||
self.prefixText = prefixText
|
|
||||||
"""list of strings to prefix generated header with (usually a copyright statement + calling convention macros)."""
|
|
||||||
|
|
||||||
self.genFuncPointers = genFuncPointers
|
|
||||||
"""True if function pointer typedefs should be generated"""
|
|
||||||
|
|
||||||
self.protectFile = protectFile
|
|
||||||
"""True if multiple inclusion protection should be generated (based on the filename) around the entire header."""
|
|
||||||
|
|
||||||
self.protectFeature = protectFeature
|
|
||||||
"""True if #ifndef..#endif protection should be generated around a feature interface in the header file."""
|
|
||||||
|
|
||||||
self.protectProto = protectProto
|
|
||||||
"""If conditional protection should be generated around prototype declarations, set to either '#ifdef' to require opt-in (#ifdef protectProtoStr) or '#ifndef' to require opt-out (#ifndef protectProtoStr). Otherwise set to None."""
|
|
||||||
|
|
||||||
self.protectProtoStr = protectProtoStr
|
|
||||||
"""#ifdef/#ifndef symbol to use around prototype declarations, if protectProto is set"""
|
|
||||||
|
|
||||||
self.apicall = apicall
|
|
||||||
"""string to use for the function declaration prefix, such as APICALL on Windows."""
|
|
||||||
|
|
||||||
self.apientry = apientry
|
|
||||||
"""string to use for the calling convention macro, in typedefs, such as APIENTRY."""
|
|
||||||
|
|
||||||
self.apientryp = apientryp
|
|
||||||
"""string to use for the calling convention macro in function pointer typedefs, such as APIENTRYP."""
|
|
||||||
|
|
||||||
self.indentFuncProto = indentFuncProto
|
|
||||||
"""True if prototype declarations should put each parameter on a separate line"""
|
|
||||||
|
|
||||||
self.indentFuncPointer = indentFuncPointer
|
|
||||||
"""True if typedefed function pointers should put each parameter on a separate line"""
|
|
||||||
|
|
||||||
self.alignFuncParam = alignFuncParam
|
|
||||||
"""if nonzero and parameters are being put on a separate line, align parameter names at the specified column"""
|
|
||||||
|
|
||||||
self.genEnumBeginEndRange = genEnumBeginEndRange
|
|
||||||
"""True if BEGIN_RANGE / END_RANGE macros should be generated for enumerated types"""
|
|
||||||
|
|
||||||
self.genAliasMacro = genAliasMacro
|
|
||||||
"""True if the OpenXR alias macro should be generated for aliased types (unclear what other circumstances this is useful)"""
|
|
||||||
|
|
||||||
self.aliasMacro = aliasMacro
|
|
||||||
"""alias macro to inject when genAliasMacro is True"""
|
|
||||||
|
|
||||||
self.misracstyle = misracstyle
|
|
||||||
"""generate MISRA C-friendly headers"""
|
|
||||||
|
|
||||||
self.misracppstyle = misracppstyle
|
|
||||||
"""generate MISRA C++-friendly headers"""
|
|
||||||
|
|
||||||
self.codeGenerator = True
|
|
||||||
"""True if this generator makes compilable code"""
|
|
||||||
|
|
||||||
|
|
||||||
class COutputGenerator(OutputGenerator):
|
|
||||||
"""Generates C-language API interfaces."""
|
|
||||||
|
|
||||||
# This is an ordered list of sections in the header file.
|
|
||||||
TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum',
|
|
||||||
'group', 'bitmask', 'funcpointer', 'struct']
|
|
||||||
ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command']
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
# Internal state - accumulators for different inner block text
|
|
||||||
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
|
||||||
self.feature_not_empty = False
|
|
||||||
self.may_alias = None
|
|
||||||
|
|
||||||
def beginFile(self, genOpts):
|
|
||||||
OutputGenerator.beginFile(self, genOpts)
|
|
||||||
# C-specific
|
|
||||||
#
|
|
||||||
# Multiple inclusion protection & C++ wrappers.
|
|
||||||
if genOpts.protectFile and self.genOpts.filename:
|
|
||||||
headerSym = re.sub(r'\.h', '_h_',
|
|
||||||
os.path.basename(self.genOpts.filename)).upper()
|
|
||||||
write('#ifndef', headerSym, file=self.outFile)
|
|
||||||
write('#define', headerSym, '1', file=self.outFile)
|
|
||||||
self.newline()
|
|
||||||
|
|
||||||
# User-supplied prefix text, if any (list of strings)
|
|
||||||
if genOpts.prefixText:
|
|
||||||
for s in genOpts.prefixText:
|
|
||||||
write(s, file=self.outFile)
|
|
||||||
|
|
||||||
# C++ extern wrapper - after prefix lines so they can add includes.
|
|
||||||
self.newline()
|
|
||||||
write('#ifdef __cplusplus', file=self.outFile)
|
|
||||||
write('extern "C" {', file=self.outFile)
|
|
||||||
write('#endif', file=self.outFile)
|
|
||||||
self.newline()
|
|
||||||
|
|
||||||
def endFile(self):
|
|
||||||
# C-specific
|
|
||||||
# Finish C++ wrapper and multiple inclusion protection
|
|
||||||
self.newline()
|
|
||||||
write('#ifdef __cplusplus', file=self.outFile)
|
|
||||||
write('}', file=self.outFile)
|
|
||||||
write('#endif', file=self.outFile)
|
|
||||||
if self.genOpts.protectFile and self.genOpts.filename:
|
|
||||||
self.newline()
|
|
||||||
write('#endif', file=self.outFile)
|
|
||||||
# Finish processing in superclass
|
|
||||||
OutputGenerator.endFile(self)
|
|
||||||
|
|
||||||
def beginFeature(self, interface, emit):
|
|
||||||
# Start processing in superclass
|
|
||||||
OutputGenerator.beginFeature(self, interface, emit)
|
|
||||||
# C-specific
|
|
||||||
# Accumulate includes, defines, types, enums, function pointer typedefs,
|
|
||||||
# end function prototypes separately for this feature. They are only
|
|
||||||
# printed in endFeature().
|
|
||||||
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
|
||||||
self.feature_not_empty = False
|
|
||||||
|
|
||||||
def endFeature(self):
|
|
||||||
"Actually write the interface to the output file."
|
|
||||||
# C-specific
|
|
||||||
if self.emit:
|
|
||||||
if self.feature_not_empty:
|
|
||||||
if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
|
|
||||||
self.newline()
|
|
||||||
if self.genOpts.protectFeature:
|
|
||||||
write('#ifndef', self.featureName, file=self.outFile)
|
|
||||||
# If type declarations are needed by other features based on
|
|
||||||
# this one, it may be necessary to suppress the ExtraProtect,
|
|
||||||
# or move it below the 'for section...' loop.
|
|
||||||
if self.featureExtraProtect is not None:
|
|
||||||
write('#ifdef', self.featureExtraProtect, file=self.outFile)
|
|
||||||
self.newline()
|
|
||||||
write('#define', self.featureName, '1', file=self.outFile)
|
|
||||||
for section in self.TYPE_SECTIONS:
|
|
||||||
contents = self.sections[section]
|
|
||||||
if contents:
|
|
||||||
write('\n'.join(contents), file=self.outFile)
|
|
||||||
if self.genOpts.genFuncPointers and self.sections['commandPointer']:
|
|
||||||
write('\n'.join(self.sections['commandPointer']), file=self.outFile)
|
|
||||||
self.newline()
|
|
||||||
if self.sections['command']:
|
|
||||||
if self.genOpts.protectProto:
|
|
||||||
write(self.genOpts.protectProto,
|
|
||||||
self.genOpts.protectProtoStr, file=self.outFile)
|
|
||||||
write('\n'.join(self.sections['command']), end='', file=self.outFile)
|
|
||||||
if self.genOpts.protectProto:
|
|
||||||
write('#endif', file=self.outFile)
|
|
||||||
else:
|
|
||||||
self.newline()
|
|
||||||
if self.featureExtraProtect is not None:
|
|
||||||
write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
|
|
||||||
if self.genOpts.protectFeature:
|
|
||||||
write('#endif /*', self.featureName, '*/', file=self.outFile)
|
|
||||||
# Finish processing in superclass
|
|
||||||
OutputGenerator.endFeature(self)
|
|
||||||
|
|
||||||
def appendSection(self, section, text):
|
|
||||||
"Append a definition to the specified section"
|
|
||||||
|
|
||||||
if section is None:
|
|
||||||
self.logMsg('error', 'Missing section in appendSection (probably a <type> element missing its \'category\' attribute. Text:', text)
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
self.sections[section].append(text)
|
|
||||||
self.feature_not_empty = True
|
|
||||||
|
|
||||||
def genType(self, typeinfo, name, alias):
|
|
||||||
"Generate type."
|
|
||||||
OutputGenerator.genType(self, typeinfo, name, alias)
|
|
||||||
typeElem = typeinfo.elem
|
|
||||||
|
|
||||||
# Vulkan:
|
|
||||||
# Determine the category of the type, and the type section to add
|
|
||||||
# its definition to.
|
|
||||||
# 'funcpointer' is added to the 'struct' section as a workaround for
|
|
||||||
# internal issue #877, since structures and function pointer types
|
|
||||||
# can have cross-dependencies.
|
|
||||||
category = typeElem.get('category')
|
|
||||||
if category == 'funcpointer':
|
|
||||||
section = 'struct'
|
|
||||||
else:
|
|
||||||
section = category
|
|
||||||
|
|
||||||
if category in ('struct', 'union'):
|
|
||||||
# If the type is a struct type, generate it using the
|
|
||||||
# special-purpose generator.
|
|
||||||
self.genStruct(typeinfo, name, alias)
|
|
||||||
else:
|
|
||||||
# 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'
|
|
||||||
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)
|
|
||||||
for elem in typeElem:
|
|
||||||
if elem.tag == 'apientry':
|
|
||||||
body += self.genOpts.apientry + noneStr(elem.tail)
|
|
||||||
else:
|
|
||||||
body += noneStr(elem.text) + noneStr(elem.tail)
|
|
||||||
if body:
|
|
||||||
# Add extra newline after multi-line entries.
|
|
||||||
if '\n' in body[0:-1]:
|
|
||||||
body += '\n'
|
|
||||||
self.appendSection(section, body)
|
|
||||||
|
|
||||||
def genProtectString(self, protect_str):
|
|
||||||
"""Generate protection string.
|
|
||||||
|
|
||||||
Protection strings are the strings defining the OS/Platform/Graphics
|
|
||||||
requirements for a given OpenXR command. When generating the
|
|
||||||
language header files, we need to make sure the items specific to a
|
|
||||||
graphics API or OS platform are properly wrapped in #ifs."""
|
|
||||||
protect_if_str = ''
|
|
||||||
protect_end_str = ''
|
|
||||||
if not protect_str:
|
|
||||||
return (protect_if_str, protect_end_str)
|
|
||||||
|
|
||||||
if ',' in protect_str:
|
|
||||||
protect_list = protect_str.split(",")
|
|
||||||
protect_defs = ('defined(%s)' % d for d in protect_list)
|
|
||||||
protect_def_str = ' && '.join(protect_defs)
|
|
||||||
protect_if_str = '#if %s\n' % protect_def_str
|
|
||||||
protect_end_str = '#endif // %s\n' % protect_def_str
|
|
||||||
else:
|
|
||||||
protect_if_str = '#ifdef %s\n' % protect_str
|
|
||||||
protect_end_str = '#endif // %s\n' % protect_str
|
|
||||||
|
|
||||||
return (protect_if_str, protect_end_str)
|
|
||||||
|
|
||||||
def typeMayAlias(self, typeName):
|
|
||||||
if not self.may_alias:
|
|
||||||
# First time we have asked if a type may alias.
|
|
||||||
# So, populate the set of all names of types that may.
|
|
||||||
|
|
||||||
# Everyone with an explicit mayalias="true"
|
|
||||||
self.may_alias = set(typeName
|
|
||||||
for typeName, data in self.registry.typedict.items()
|
|
||||||
if data.elem.get('mayalias') == 'true')
|
|
||||||
|
|
||||||
# Every type mentioned in some other type's parentstruct attribute.
|
|
||||||
parent_structs = (otherType.elem.get('parentstruct')
|
|
||||||
for otherType in self.registry.typedict.values())
|
|
||||||
self.may_alias.update(set(x for x in parent_structs
|
|
||||||
if x is not None))
|
|
||||||
return typeName in self.may_alias
|
|
||||||
|
|
||||||
def genStruct(self, typeinfo, typeName, alias):
|
|
||||||
"""Generate struct (e.g. C "struct" type).
|
|
||||||
|
|
||||||
This is a special case of the <type> tag where the contents are
|
|
||||||
interpreted as a set of <member> tags instead of freeform C
|
|
||||||
C type declarations. The <member> tags are just like <param>
|
|
||||||
tags - they are a declaration of a struct or union member.
|
|
||||||
Only simple member declarations are supported (no nested
|
|
||||||
structs etc.)
|
|
||||||
|
|
||||||
If alias is not None, then this struct aliases another; just
|
|
||||||
generate a typedef of that alias."""
|
|
||||||
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
|
|
||||||
|
|
||||||
typeElem = typeinfo.elem
|
|
||||||
|
|
||||||
if alias:
|
|
||||||
body = 'typedef ' + alias + ' ' + typeName + ';\n'
|
|
||||||
else:
|
|
||||||
body = ''
|
|
||||||
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
|
|
||||||
if protect_begin:
|
|
||||||
body += protect_begin
|
|
||||||
body += 'typedef ' + typeElem.get('category')
|
|
||||||
|
|
||||||
# This is an OpenXR-specific alternative where aliasing refers
|
|
||||||
# to an inheritance hierarchy of types rather than C-level type
|
|
||||||
# aliases.
|
|
||||||
if self.genOpts.genAliasMacro and self.typeMayAlias(typeName):
|
|
||||||
body += ' ' + self.genOpts.aliasMacro
|
|
||||||
|
|
||||||
body += ' ' + typeName + ' {\n'
|
|
||||||
|
|
||||||
targetLen = self.getMaxCParamTypeLength(typeinfo)
|
|
||||||
for member in typeElem.findall('.//member'):
|
|
||||||
body += self.makeCParamDecl(member, targetLen + 4)
|
|
||||||
body += ';\n'
|
|
||||||
body += '} ' + typeName + ';\n'
|
|
||||||
if protect_end:
|
|
||||||
body += protect_end
|
|
||||||
|
|
||||||
self.appendSection('struct', body)
|
|
||||||
|
|
||||||
def genGroup(self, groupinfo, groupName, alias=None):
|
|
||||||
"""Generate groups (e.g. C "enum" type).
|
|
||||||
|
|
||||||
These are concatenated together with other types.
|
|
||||||
|
|
||||||
If alias is not None, it is the name of another group type
|
|
||||||
which aliases this type; just generate that alias."""
|
|
||||||
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
|
|
||||||
groupElem = groupinfo.elem
|
|
||||||
|
|
||||||
# After either enumerated type or alias paths, add the declaration
|
|
||||||
# to the appropriate section for the group being defined.
|
|
||||||
if groupElem.get('type') == 'bitmask':
|
|
||||||
section = 'bitmask'
|
|
||||||
else:
|
|
||||||
section = 'group'
|
|
||||||
|
|
||||||
if alias:
|
|
||||||
# If the group name is aliased, just emit a typedef declaration
|
|
||||||
# for the alias.
|
|
||||||
body = 'typedef ' + alias + ' ' + groupName + ';\n'
|
|
||||||
self.appendSection(section, body)
|
|
||||||
else:
|
|
||||||
(section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
|
|
||||||
self.appendSection(section, "\n" + body)
|
|
||||||
|
|
||||||
def genEnum(self, enuminfo, name, alias):
|
|
||||||
"""Generate the C declaration for a constant (a single <enum> value)."""
|
|
||||||
|
|
||||||
OutputGenerator.genEnum(self, enuminfo, name, alias)
|
|
||||||
|
|
||||||
body = self.buildConstantCDecl(enuminfo, name, alias)
|
|
||||||
self.appendSection('enum', body)
|
|
||||||
|
|
||||||
def genCmd(self, cmdinfo, name, alias):
|
|
||||||
"Command generation"
|
|
||||||
OutputGenerator.genCmd(self, cmdinfo, name, alias)
|
|
||||||
|
|
||||||
# if alias:
|
|
||||||
# prefix = '// ' + name + ' is an alias of command ' + alias + '\n'
|
|
||||||
# else:
|
|
||||||
# prefix = ''
|
|
||||||
|
|
||||||
prefix = ''
|
|
||||||
decls = self.makeCDecls(cmdinfo.elem)
|
|
||||||
self.appendSection('command', prefix + decls[0] + '\n')
|
|
||||||
if self.genOpts.genFuncPointers:
|
|
||||||
self.appendSection('commandPointer', decls[1])
|
|
||||||
|
|
||||||
def misracstyle(self):
|
|
||||||
return self.genOpts.misracstyle;
|
|
||||||
|
|
||||||
def misracppstyle(self):
|
|
||||||
return self.genOpts.misracppstyle;
|
|
@ -1,358 +0,0 @@
|
|||||||
#!/usr/bin/python3 -i
|
|
||||||
#
|
|
||||||
# Copyright 2013-2022 The Khronos Group Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
# Base class for working-group-specific style conventions,
|
|
||||||
# used in generation.
|
|
||||||
|
|
||||||
from enum import Enum
|
|
||||||
|
|
||||||
# Type categories that respond "False" to isStructAlwaysValid
|
|
||||||
# basetype is home to typedefs like ..Bool32
|
|
||||||
CATEGORIES_REQUIRING_VALIDATION = set(('handle',
|
|
||||||
'enum',
|
|
||||||
'bitmask',
|
|
||||||
'basetype',
|
|
||||||
None))
|
|
||||||
|
|
||||||
# These are basic C types pulled in via openxr_platform_defines.h
|
|
||||||
TYPES_KNOWN_ALWAYS_VALID = set(('char',
|
|
||||||
'float',
|
|
||||||
'int8_t', 'uint8_t',
|
|
||||||
'int32_t', 'uint32_t',
|
|
||||||
'int64_t', 'uint64_t',
|
|
||||||
'size_t',
|
|
||||||
'uintptr_t',
|
|
||||||
'int',
|
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
class ProseListFormats(Enum):
|
|
||||||
"""A connective, possibly with a quantifier."""
|
|
||||||
AND = 0
|
|
||||||
EACH_AND = 1
|
|
||||||
OR = 2
|
|
||||||
ANY_OR = 3
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_string(cls, s):
|
|
||||||
if s == 'or':
|
|
||||||
return cls.OR
|
|
||||||
if s == 'and':
|
|
||||||
return cls.AND
|
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def connective(self):
|
|
||||||
if self in (ProseListFormats.OR, ProseListFormats.ANY_OR):
|
|
||||||
return 'or'
|
|
||||||
return 'and'
|
|
||||||
|
|
||||||
def quantifier(self, n):
|
|
||||||
"""Return the desired quantifier for a list of a given length."""
|
|
||||||
if self == ProseListFormats.ANY_OR:
|
|
||||||
if n > 1:
|
|
||||||
return 'any of '
|
|
||||||
elif self == ProseListFormats.EACH_AND:
|
|
||||||
if n > 2:
|
|
||||||
return 'each of '
|
|
||||||
if n == 2:
|
|
||||||
return 'both of '
|
|
||||||
return ''
|
|
||||||
|
|
||||||
|
|
||||||
class ConventionsBase:
|
|
||||||
"""WG-specific conventions."""
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self._command_prefix = None
|
|
||||||
self._type_prefix = None
|
|
||||||
|
|
||||||
def formatExtension(self, name):
|
|
||||||
"""Mark up an extension name as a link the spec."""
|
|
||||||
return '`apiext:{}`'.format(name)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def null(self):
|
|
||||||
"""Preferred spelling of NULL."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def makeProseList(self, elements, fmt=ProseListFormats.AND, with_verb=False, *args, **kwargs):
|
|
||||||
"""Make a (comma-separated) list for use in prose.
|
|
||||||
|
|
||||||
Adds a connective (by default, 'and')
|
|
||||||
before the last element if there are more than 1.
|
|
||||||
|
|
||||||
Adds the right one of "is" or "are" to the end if with_verb is true.
|
|
||||||
|
|
||||||
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
|
||||||
if specified by fmt.
|
|
||||||
|
|
||||||
Override with a different method or different call to
|
|
||||||
_implMakeProseList if you want to add a comma for two elements,
|
|
||||||
or not use a serial comma.
|
|
||||||
"""
|
|
||||||
return self._implMakeProseList(elements, fmt, with_verb, *args, **kwargs)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def struct_macro(self):
|
|
||||||
"""Get the appropriate format macro for a structure.
|
|
||||||
|
|
||||||
May override.
|
|
||||||
"""
|
|
||||||
return 'slink:'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def external_macro(self):
|
|
||||||
"""Get the appropriate format macro for an external type like uint32_t.
|
|
||||||
|
|
||||||
May override.
|
|
||||||
"""
|
|
||||||
return 'code:'
|
|
||||||
|
|
||||||
def makeStructName(self, name):
|
|
||||||
"""Prepend the appropriate format macro for a structure to a structure type name.
|
|
||||||
|
|
||||||
Uses struct_macro, so just override that if you want to change behavior.
|
|
||||||
"""
|
|
||||||
return self.struct_macro + name
|
|
||||||
|
|
||||||
def makeExternalTypeName(self, name):
|
|
||||||
"""Prepend the appropriate format macro for an external type like uint32_t to a type name.
|
|
||||||
|
|
||||||
Uses external_macro, so just override that if you want to change behavior.
|
|
||||||
"""
|
|
||||||
return self.external_macro + name
|
|
||||||
|
|
||||||
def _implMakeProseList(self, elements, fmt, with_verb, comma_for_two_elts=False, serial_comma=True):
|
|
||||||
"""Internal-use implementation to make a (comma-separated) list for use in prose.
|
|
||||||
|
|
||||||
Adds a connective (by default, 'and')
|
|
||||||
before the last element if there are more than 1,
|
|
||||||
and only includes commas if there are more than 2
|
|
||||||
(if comma_for_two_elts is False).
|
|
||||||
|
|
||||||
Adds the right one of "is" or "are" to the end if with_verb is true.
|
|
||||||
|
|
||||||
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
|
||||||
if specified by fmt.
|
|
||||||
|
|
||||||
Do not edit these defaults, override self.makeProseList().
|
|
||||||
"""
|
|
||||||
assert(serial_comma) # did not implement what we did not need
|
|
||||||
if isinstance(fmt, str):
|
|
||||||
fmt = ProseListFormats.from_string(fmt)
|
|
||||||
|
|
||||||
my_elts = list(elements)
|
|
||||||
if len(my_elts) > 1:
|
|
||||||
my_elts[-1] = '{} {}'.format(fmt.connective, my_elts[-1])
|
|
||||||
|
|
||||||
if not comma_for_two_elts and len(my_elts) <= 2:
|
|
||||||
prose = ' '.join(my_elts)
|
|
||||||
else:
|
|
||||||
prose = ', '.join(my_elts)
|
|
||||||
|
|
||||||
quantifier = fmt.quantifier(len(my_elts))
|
|
||||||
|
|
||||||
parts = [quantifier, prose]
|
|
||||||
|
|
||||||
if with_verb:
|
|
||||||
if len(my_elts) > 1:
|
|
||||||
parts.append(' are')
|
|
||||||
else:
|
|
||||||
parts.append(' is')
|
|
||||||
return ''.join(parts)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def file_suffix(self):
|
|
||||||
"""Return suffix of generated Asciidoctor files"""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def api_name(self, spectype=None):
|
|
||||||
"""Return API or specification name for citations in ref pages.
|
|
||||||
|
|
||||||
spectype is the spec this refpage is for.
|
|
||||||
'api' (the default value) is the main API Specification.
|
|
||||||
If an unrecognized spectype is given, returns None.
|
|
||||||
|
|
||||||
Must implement."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def should_insert_may_alias_macro(self, genOpts):
|
|
||||||
"""Return true if we should insert a "may alias" macro in this file.
|
|
||||||
|
|
||||||
Only used by OpenXR right now."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def command_prefix(self):
|
|
||||||
"""Return the expected prefix of commands/functions.
|
|
||||||
|
|
||||||
Implemented in terms of api_prefix."""
|
|
||||||
if not self._command_prefix:
|
|
||||||
self._command_prefix = self.api_prefix[:].replace('_', '').lower()
|
|
||||||
return self._command_prefix
|
|
||||||
|
|
||||||
@property
|
|
||||||
def type_prefix(self):
|
|
||||||
"""Return the expected prefix of type names.
|
|
||||||
|
|
||||||
Implemented in terms of command_prefix (and in turn, api_prefix)."""
|
|
||||||
if not self._type_prefix:
|
|
||||||
self._type_prefix = ''.join(
|
|
||||||
(self.command_prefix[0:1].upper(), self.command_prefix[1:]))
|
|
||||||
return self._type_prefix
|
|
||||||
|
|
||||||
@property
|
|
||||||
def api_prefix(self):
|
|
||||||
"""Return API token prefix.
|
|
||||||
|
|
||||||
Typically two uppercase letters followed by an underscore.
|
|
||||||
|
|
||||||
Must implement."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
@property
|
|
||||||
def api_version_prefix(self):
|
|
||||||
"""Return API core version token prefix.
|
|
||||||
|
|
||||||
Implemented in terms of api_prefix.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return self.api_prefix + 'VERSION_'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def KHR_prefix(self):
|
|
||||||
"""Return extension name prefix for KHR extensions.
|
|
||||||
|
|
||||||
Implemented in terms of api_prefix.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return self.api_prefix + 'KHR_'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def EXT_prefix(self):
|
|
||||||
"""Return extension name prefix for EXT extensions.
|
|
||||||
|
|
||||||
Implemented in terms of api_prefix.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return self.api_prefix + 'EXT_'
|
|
||||||
|
|
||||||
def writeFeature(self, featureExtraProtect, filename):
|
|
||||||
"""Return True if OutputGenerator.endFeature should write this feature.
|
|
||||||
|
|
||||||
Defaults to always True.
|
|
||||||
Used in COutputGenerator.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return True
|
|
||||||
|
|
||||||
def requires_error_validation(self, return_type):
|
|
||||||
"""Return True if the return_type element is an API result code
|
|
||||||
requiring error validation.
|
|
||||||
|
|
||||||
Defaults to always False.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def required_errors(self):
|
|
||||||
"""Return a list of required error codes for validation.
|
|
||||||
|
|
||||||
Defaults to an empty list.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return []
|
|
||||||
|
|
||||||
def is_voidpointer_alias(self, tag, text, tail):
|
|
||||||
"""Return True if the declaration components (tag,text,tail) of an
|
|
||||||
element represents a void * type.
|
|
||||||
|
|
||||||
Defaults to a reasonable implementation.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return tag == 'type' and text == 'void' and tail.startswith('*')
|
|
||||||
|
|
||||||
def make_voidpointer_alias(self, tail):
|
|
||||||
"""Reformat a void * declaration to include the API alias macro.
|
|
||||||
|
|
||||||
Defaults to a no-op.
|
|
||||||
|
|
||||||
Must override if you actually want to use this feature in your project."""
|
|
||||||
return tail
|
|
||||||
|
|
||||||
def category_requires_validation(self, category):
|
|
||||||
"""Return True if the given type 'category' always requires validation.
|
|
||||||
|
|
||||||
Defaults to a reasonable implementation.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return category in CATEGORIES_REQUIRING_VALIDATION
|
|
||||||
|
|
||||||
def type_always_valid(self, typename):
|
|
||||||
"""Return True if the given type name is always valid (never requires validation).
|
|
||||||
|
|
||||||
This is for things like integers.
|
|
||||||
|
|
||||||
Defaults to a reasonable implementation.
|
|
||||||
|
|
||||||
May override."""
|
|
||||||
return typename in TYPES_KNOWN_ALWAYS_VALID
|
|
||||||
|
|
||||||
@property
|
|
||||||
def should_skip_checking_codes(self):
|
|
||||||
"""Return True if more than the basic validation of return codes should
|
|
||||||
be skipped for a command."""
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def generate_index_terms(self):
|
|
||||||
"""Return True if asiidoctor index terms should be generated as part
|
|
||||||
of an API interface from the docgenerator."""
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def generate_enum_table(self):
|
|
||||||
"""Return True if asciidoctor tables describing enumerants in a
|
|
||||||
group should be generated as part of group generation."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def generate_max_enum_in_docs(self):
|
|
||||||
"""Return True if MAX_ENUM tokens should be generated in
|
|
||||||
documentation includes."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def extension_include_string(self, ext):
|
|
||||||
"""Return format string for include:: line for an extension appendix
|
|
||||||
file. ext is an object with the following members:
|
|
||||||
- name - extension string string
|
|
||||||
- vendor - vendor portion of name
|
|
||||||
- barename - remainder of name
|
|
||||||
|
|
||||||
Must implement."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
@property
|
|
||||||
def refpage_generated_include_path(self):
|
|
||||||
"""Return path relative to the generated reference pages, to the
|
|
||||||
generated API include files.
|
|
||||||
|
|
||||||
Must implement."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def valid_flag_bit(self, bitpos):
|
|
||||||
"""Return True if bitpos is an allowed numeric bit position for
|
|
||||||
an API flag.
|
|
||||||
|
|
||||||
Behavior depends on the data type used for flags (which may be 32
|
|
||||||
or 64 bits), and may depend on assumptions about compiler
|
|
||||||
handling of sign bits in enumerated types, as well."""
|
|
||||||
return True
|
|
File diff suppressed because it is too large
Load Diff
@ -1,817 +0,0 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# Copyright 2013-2022 The Khronos Group Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import pdb
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import time
|
|
||||||
import xml.etree.ElementTree as etree
|
|
||||||
|
|
||||||
from cgenerator import CGeneratorOptions, COutputGenerator
|
|
||||||
from docgenerator import DocGeneratorOptions, DocOutputGenerator
|
|
||||||
from extensionmetadocgenerator import (ExtensionMetaDocGeneratorOptions,
|
|
||||||
ExtensionMetaDocOutputGenerator)
|
|
||||||
from interfacedocgenerator import InterfaceDocGenerator
|
|
||||||
from generator import write
|
|
||||||
from spirvcapgenerator import SpirvCapabilityOutputGenerator
|
|
||||||
from hostsyncgenerator import HostSynchronizationOutputGenerator
|
|
||||||
from formatsgenerator import FormatsOutputGenerator
|
|
||||||
from pygenerator import PyOutputGenerator
|
|
||||||
from rubygenerator import RubyOutputGenerator
|
|
||||||
from reflib import logDiag, logWarn, setLogFile
|
|
||||||
from reg import Registry
|
|
||||||
from validitygenerator import ValidityOutputGenerator
|
|
||||||
from apiconventions import APIConventions
|
|
||||||
|
|
||||||
|
|
||||||
# Simple timer functions
|
|
||||||
startTime = None
|
|
||||||
|
|
||||||
|
|
||||||
def startTimer(timeit):
|
|
||||||
global startTime
|
|
||||||
if timeit:
|
|
||||||
startTime = time.process_time()
|
|
||||||
|
|
||||||
|
|
||||||
def endTimer(timeit, msg):
|
|
||||||
global startTime
|
|
||||||
if timeit:
|
|
||||||
endTime = time.process_time()
|
|
||||||
logDiag(msg, endTime - startTime)
|
|
||||||
startTime = None
|
|
||||||
|
|
||||||
|
|
||||||
def makeREstring(strings, default=None, strings_are_regex=False):
|
|
||||||
"""Turn a list of strings into a regexp string matching exactly those strings."""
|
|
||||||
if strings or default is None:
|
|
||||||
if not strings_are_regex:
|
|
||||||
strings = (re.escape(s) for s in strings)
|
|
||||||
return '^(' + '|'.join(strings) + ')$'
|
|
||||||
return default
|
|
||||||
|
|
||||||
|
|
||||||
def makeGenOpts(args):
|
|
||||||
"""Returns a directory of [ generator function, generator options ] indexed
|
|
||||||
by specified short names. The generator options incorporate the following
|
|
||||||
parameters:
|
|
||||||
|
|
||||||
args is an parsed argument object; see below for the fields that are used."""
|
|
||||||
global genOpts
|
|
||||||
genOpts = {}
|
|
||||||
|
|
||||||
# Default class of extensions to include, or None
|
|
||||||
defaultExtensions = args.defaultExtensions
|
|
||||||
|
|
||||||
# Additional extensions to include (list of extensions)
|
|
||||||
extensions = args.extension
|
|
||||||
|
|
||||||
# Extensions to remove (list of extensions)
|
|
||||||
removeExtensions = args.removeExtensions
|
|
||||||
|
|
||||||
# Extensions to emit (list of extensions)
|
|
||||||
emitExtensions = args.emitExtensions
|
|
||||||
|
|
||||||
# SPIR-V capabilities / features to emit (list of extensions & capabilities)
|
|
||||||
emitSpirv = args.emitSpirv
|
|
||||||
|
|
||||||
# Vulkan Formats to emit
|
|
||||||
emitFormats = args.emitFormats
|
|
||||||
|
|
||||||
# Features to include (list of features)
|
|
||||||
features = args.feature
|
|
||||||
|
|
||||||
# Whether to disable inclusion protect in headers
|
|
||||||
protect = args.protect
|
|
||||||
|
|
||||||
# Output target directory
|
|
||||||
directory = args.directory
|
|
||||||
|
|
||||||
# Path to generated files, particularly api.py
|
|
||||||
genpath = args.genpath
|
|
||||||
|
|
||||||
# Generate MISRA C-friendly headers
|
|
||||||
misracstyle = args.misracstyle;
|
|
||||||
|
|
||||||
# Generate MISRA C++-friendly headers
|
|
||||||
misracppstyle = args.misracppstyle;
|
|
||||||
|
|
||||||
# Descriptive names for various regexp patterns used to select
|
|
||||||
# versions and extensions
|
|
||||||
allFormats = allSpirv = allFeatures = allExtensions = r'.*'
|
|
||||||
|
|
||||||
# Turn lists of names/patterns into matching regular expressions
|
|
||||||
addExtensionsPat = makeREstring(extensions, None)
|
|
||||||
removeExtensionsPat = makeREstring(removeExtensions, None)
|
|
||||||
emitExtensionsPat = makeREstring(emitExtensions, allExtensions)
|
|
||||||
emitSpirvPat = makeREstring(emitSpirv, allSpirv)
|
|
||||||
emitFormatsPat = makeREstring(emitFormats, allFormats)
|
|
||||||
featuresPat = makeREstring(features, allFeatures)
|
|
||||||
|
|
||||||
# Copyright text prefixing all headers (list of strings).
|
|
||||||
# The SPDX formatting below works around constraints of the 'reuse' tool
|
|
||||||
prefixStrings = [
|
|
||||||
'/*',
|
|
||||||
'** Copyright 2015-2022 The Khronos Group Inc.',
|
|
||||||
'**',
|
|
||||||
'** SPDX' + '-License-Identifier: Apache-2.0',
|
|
||||||
'*/',
|
|
||||||
''
|
|
||||||
]
|
|
||||||
|
|
||||||
# Text specific to Vulkan headers
|
|
||||||
vkPrefixStrings = [
|
|
||||||
'/*',
|
|
||||||
'** This header is generated from the Khronos Vulkan XML API Registry.',
|
|
||||||
'**',
|
|
||||||
'*/',
|
|
||||||
''
|
|
||||||
]
|
|
||||||
|
|
||||||
# Defaults for generating re-inclusion protection wrappers (or not)
|
|
||||||
protectFile = protect
|
|
||||||
|
|
||||||
# An API style conventions object
|
|
||||||
conventions = APIConventions()
|
|
||||||
|
|
||||||
defaultAPIName = conventions.xml_api_name
|
|
||||||
|
|
||||||
# API include files for spec and ref pages
|
|
||||||
# Overwrites include subdirectories in spec source tree
|
|
||||||
# The generated include files do not include the calling convention
|
|
||||||
# macros (apientry etc.), unlike the header files.
|
|
||||||
# Because the 1.0 core branch includes ref pages for extensions,
|
|
||||||
# all the extension interfaces need to be generated, even though
|
|
||||||
# none are used by the core spec itself.
|
|
||||||
genOpts['apiinc'] = [
|
|
||||||
DocOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = genpath,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
apicall = '',
|
|
||||||
apientry = '',
|
|
||||||
apientryp = '*',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
expandEnumerants = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Python and Ruby representations of API information, used by scripts
|
|
||||||
# that do not need to load the full XML.
|
|
||||||
genOpts['api.py'] = [
|
|
||||||
PyOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'api.py',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
genOpts['api.rb'] = [
|
|
||||||
RubyOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'api.rb',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# API validity files for spec
|
|
||||||
#
|
|
||||||
# requireCommandAliases is set to True because we need validity files
|
|
||||||
# for the command something is promoted to even when the promoted-to
|
|
||||||
# feature is not included. This avoids wordy includes of validity files.
|
|
||||||
genOpts['validinc'] = [
|
|
||||||
ValidityOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
requireCommandAliases = True,
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
# API host sync table files for spec
|
|
||||||
genOpts['hostsyncinc'] = [
|
|
||||||
HostSynchronizationOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Extension metainformation for spec extension appendices
|
|
||||||
# Includes all extensions by default, but only so that the generated
|
|
||||||
# 'promoted_extensions_*' files refer to all extensions that were
|
|
||||||
# promoted to a core version.
|
|
||||||
genOpts['extinc'] = [
|
|
||||||
ExtensionMetaDocOutputGenerator,
|
|
||||||
ExtensionMetaDocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = None,
|
|
||||||
defaultExtensions = defaultExtensions,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = None,
|
|
||||||
emitExtensions = emitExtensionsPat)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Version and extension interface docs for version/extension appendices
|
|
||||||
# Includes all extensions by default.
|
|
||||||
genOpts['interfaceinc'] = [
|
|
||||||
InterfaceDocGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
genOpts['spirvcapinc'] = [
|
|
||||||
SpirvCapabilityOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
emitSpirv = emitSpirvPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Used to generate various format chapter tables
|
|
||||||
genOpts['formatsinc'] = [
|
|
||||||
FormatsOutputGenerator,
|
|
||||||
DocGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'timeMarker',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
emitFormats = emitFormatsPat,
|
|
||||||
reparentEnums = False)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Platform extensions, in their own header files
|
|
||||||
# Each element of the platforms[] array defines information for
|
|
||||||
# generating a single platform:
|
|
||||||
# [0] is the generated header file name
|
|
||||||
# [1] is the set of platform extensions to generate
|
|
||||||
# [2] is additional extensions whose interfaces should be considered,
|
|
||||||
# but suppressed in the output, to avoid duplicate definitions of
|
|
||||||
# dependent types like VkDisplayKHR and VkSurfaceKHR which come from
|
|
||||||
# non-platform extensions.
|
|
||||||
|
|
||||||
# Track all platform extensions, for exclusion from vulkan_core.h
|
|
||||||
allPlatformExtensions = []
|
|
||||||
|
|
||||||
# Extensions suppressed for all WSI platforms (WSI extensions required
|
|
||||||
# by all platforms)
|
|
||||||
commonSuppressExtensions = [ 'VK_KHR_display', 'VK_KHR_swapchain' ]
|
|
||||||
|
|
||||||
# Extensions required and suppressed for beta "platform". This can
|
|
||||||
# probably eventually be derived from the requires= attributes of
|
|
||||||
# the extension blocks.
|
|
||||||
betaRequireExtensions = [
|
|
||||||
'VK_KHR_portability_subset',
|
|
||||||
'VK_KHR_video_queue',
|
|
||||||
'VK_KHR_video_decode_queue',
|
|
||||||
'VK_KHR_video_encode_queue',
|
|
||||||
'VK_EXT_video_decode_h264',
|
|
||||||
'VK_EXT_video_decode_h265',
|
|
||||||
'VK_EXT_video_encode_h264',
|
|
||||||
'VK_EXT_video_encode_h265',
|
|
||||||
]
|
|
||||||
|
|
||||||
betaSuppressExtensions = []
|
|
||||||
|
|
||||||
platforms = [
|
|
||||||
[ 'vulkan_android.h', [ 'VK_KHR_android_surface',
|
|
||||||
'VK_ANDROID_external_memory_android_hardware_buffer'
|
|
||||||
], commonSuppressExtensions +
|
|
||||||
[ 'VK_KHR_format_feature_flags2',
|
|
||||||
] ],
|
|
||||||
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface',
|
|
||||||
'VK_FUCHSIA_external_memory',
|
|
||||||
'VK_FUCHSIA_external_semaphore',
|
|
||||||
'VK_FUCHSIA_buffer_collection' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface',
|
|
||||||
'VK_GGP_frame_token' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive' ],
|
|
||||||
commonSuppressExtensions +
|
|
||||||
[ 'VK_KHR_external_semaphore',
|
|
||||||
'VK_KHR_external_memory_capabilities',
|
|
||||||
'VK_KHR_external_fence',
|
|
||||||
'VK_KHR_external_fence_capabilities',
|
|
||||||
'VK_KHR_get_surface_capabilities2',
|
|
||||||
'VK_NV_external_memory_capabilities',
|
|
||||||
] ],
|
|
||||||
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_directfb.h', [ 'VK_EXT_directfb_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_metal.h', [ 'VK_EXT_metal_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_screen.h', [ 'VK_QNX_screen_surface' ], commonSuppressExtensions ],
|
|
||||||
[ 'vulkan_beta.h', betaRequireExtensions, betaSuppressExtensions ],
|
|
||||||
]
|
|
||||||
|
|
||||||
for platform in platforms:
|
|
||||||
headername = platform[0]
|
|
||||||
|
|
||||||
allPlatformExtensions += platform[1]
|
|
||||||
|
|
||||||
addPlatformExtensionsRE = makeREstring(
|
|
||||||
platform[1] + platform[2], strings_are_regex=True)
|
|
||||||
emitPlatformExtensionsRE = makeREstring(
|
|
||||||
platform[1], strings_are_regex=True)
|
|
||||||
|
|
||||||
opts = CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = headername,
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = None,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addPlatformExtensionsRE,
|
|
||||||
removeExtensions = None,
|
|
||||||
emitExtensions = emitPlatformExtensionsRE,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = True,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '#ifndef',
|
|
||||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
|
||||||
apicall = 'VKAPI_ATTR ',
|
|
||||||
apientry = 'VKAPI_CALL ',
|
|
||||||
apientryp = 'VKAPI_PTR *',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
misracstyle = misracstyle,
|
|
||||||
misracppstyle = misracppstyle)
|
|
||||||
|
|
||||||
genOpts[headername] = [ COutputGenerator, opts ]
|
|
||||||
|
|
||||||
# Header for core API + extensions.
|
|
||||||
# To generate just the core API,
|
|
||||||
# change to 'defaultExtensions = None' below.
|
|
||||||
#
|
|
||||||
# By default this adds all enabled, non-platform extensions.
|
|
||||||
# It removes all platform extensions (from the platform headers options
|
|
||||||
# constructed above) as well as any explicitly specified removals.
|
|
||||||
|
|
||||||
removeExtensionsPat = makeREstring(
|
|
||||||
allPlatformExtensions + removeExtensions, None, strings_are_regex=True)
|
|
||||||
|
|
||||||
genOpts['vulkan_core.h'] = [
|
|
||||||
COutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'vulkan_core.h',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = defaultExtensions,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = True,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '#ifndef',
|
|
||||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
|
||||||
apicall = 'VKAPI_ATTR ',
|
|
||||||
apientry = 'VKAPI_CALL ',
|
|
||||||
apientryp = 'VKAPI_PTR *',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
misracstyle = misracstyle,
|
|
||||||
misracppstyle = misracppstyle)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Unused - vulkan10.h target.
|
|
||||||
# It is possible to generate a header with just the Vulkan 1.0 +
|
|
||||||
# extension interfaces defined, but since the promoted KHR extensions
|
|
||||||
# are now defined in terms of the 1.1 interfaces, such a header is very
|
|
||||||
# similar to vulkan_core.h.
|
|
||||||
genOpts['vulkan10.h'] = [
|
|
||||||
COutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'vulkan10.h',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = 'VK_VERSION_1_0',
|
|
||||||
emitversions = 'VK_VERSION_1_0',
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = None,
|
|
||||||
removeExtensions = None,
|
|
||||||
emitExtensions = None,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = True,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '#ifndef',
|
|
||||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
|
||||||
apicall = 'VKAPI_ATTR ',
|
|
||||||
apientry = 'VKAPI_CALL ',
|
|
||||||
apientryp = 'VKAPI_PTR *',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
misracstyle = misracstyle,
|
|
||||||
misracppstyle = misracppstyle)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Video header target - combines all video extension dependencies into a
|
|
||||||
# single header, at present.
|
|
||||||
genOpts['vk_video.h'] = [
|
|
||||||
COutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'vk_video.h',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = 'vulkan',
|
|
||||||
profile = None,
|
|
||||||
versions = None,
|
|
||||||
emitversions = None,
|
|
||||||
defaultExtensions = defaultExtensions,
|
|
||||||
addExtensions = addExtensionsPat,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = True,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '#ifndef',
|
|
||||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
|
||||||
apicall = '',
|
|
||||||
apientry = '',
|
|
||||||
apientryp = '',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
misracstyle = misracstyle,
|
|
||||||
misracppstyle = misracppstyle)
|
|
||||||
]
|
|
||||||
|
|
||||||
# Video extension 'Std' interfaces, each in its own header files
|
|
||||||
# These are not Vulkan extensions, or a part of the Vulkan API at all,
|
|
||||||
# but are treated in a similar fashion for generation purposes.
|
|
||||||
#
|
|
||||||
# Each element of the videoStd[] array is an 'extension' name defining
|
|
||||||
# an iterface, and is also the basis for the generated header file name.
|
|
||||||
|
|
||||||
videoStd = [
|
|
||||||
'vulkan_video_codecs_common',
|
|
||||||
'vulkan_video_codec_h264std',
|
|
||||||
'vulkan_video_codec_h264std_decode',
|
|
||||||
'vulkan_video_codec_h264std_encode',
|
|
||||||
'vulkan_video_codec_h265std',
|
|
||||||
'vulkan_video_codec_h265std_decode',
|
|
||||||
'vulkan_video_codec_h265std_encode',
|
|
||||||
]
|
|
||||||
|
|
||||||
addExtensionRE = makeREstring(videoStd)
|
|
||||||
for codec in videoStd:
|
|
||||||
headername = f'{codec}.h'
|
|
||||||
|
|
||||||
# Consider all of the codecs 'extensions', but only emit this one
|
|
||||||
emitExtensionRE = makeREstring([codec])
|
|
||||||
|
|
||||||
opts = CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = headername,
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = None,
|
|
||||||
emitversions = None,
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = addExtensionRE,
|
|
||||||
removeExtensions = None,
|
|
||||||
emitExtensions = emitExtensionRE,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = False,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
alignFuncParam = 48,
|
|
||||||
)
|
|
||||||
|
|
||||||
genOpts[headername] = [ COutputGenerator, opts ]
|
|
||||||
|
|
||||||
# Unused - vulkan11.h target.
|
|
||||||
# It is possible to generate a header with just the Vulkan 1.0 +
|
|
||||||
# extension interfaces defined, but since the promoted KHR extensions
|
|
||||||
# are now defined in terms of the 1.1 interfaces, such a header is very
|
|
||||||
# similar to vulkan_core.h.
|
|
||||||
genOpts['vulkan11.h'] = [
|
|
||||||
COutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'vulkan11.h',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = '^VK_VERSION_1_[01]$',
|
|
||||||
emitversions = '^VK_VERSION_1_[01]$',
|
|
||||||
defaultExtensions = None,
|
|
||||||
addExtensions = None,
|
|
||||||
removeExtensions = None,
|
|
||||||
emitExtensions = None,
|
|
||||||
prefixText = prefixStrings + vkPrefixStrings,
|
|
||||||
genFuncPointers = True,
|
|
||||||
protectFile = protectFile,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '#ifndef',
|
|
||||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
|
||||||
apicall = 'VKAPI_ATTR ',
|
|
||||||
apientry = 'VKAPI_CALL ',
|
|
||||||
apientryp = 'VKAPI_PTR *',
|
|
||||||
alignFuncParam = 48,
|
|
||||||
misracstyle = misracstyle,
|
|
||||||
misracppstyle = misracppstyle)
|
|
||||||
]
|
|
||||||
|
|
||||||
genOpts['alias.h'] = [
|
|
||||||
COutputGenerator,
|
|
||||||
CGeneratorOptions(
|
|
||||||
conventions = conventions,
|
|
||||||
filename = 'alias.h',
|
|
||||||
directory = directory,
|
|
||||||
genpath = None,
|
|
||||||
apiname = defaultAPIName,
|
|
||||||
profile = None,
|
|
||||||
versions = featuresPat,
|
|
||||||
emitversions = featuresPat,
|
|
||||||
defaultExtensions = defaultExtensions,
|
|
||||||
addExtensions = None,
|
|
||||||
removeExtensions = removeExtensionsPat,
|
|
||||||
emitExtensions = emitExtensionsPat,
|
|
||||||
prefixText = None,
|
|
||||||
genFuncPointers = False,
|
|
||||||
protectFile = False,
|
|
||||||
protectFeature = False,
|
|
||||||
protectProto = '',
|
|
||||||
protectProtoStr = '',
|
|
||||||
apicall = '',
|
|
||||||
apientry = '',
|
|
||||||
apientryp = '',
|
|
||||||
alignFuncParam = 36)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def genTarget(args):
|
|
||||||
"""Create an API generator and corresponding generator options based on
|
|
||||||
the requested target and command line options.
|
|
||||||
|
|
||||||
This is encapsulated in a function so it can be profiled and/or timed.
|
|
||||||
The args parameter is an parsed argument object containing the following
|
|
||||||
fields that are used:
|
|
||||||
|
|
||||||
- target - target to generate
|
|
||||||
- directory - directory to generate it in
|
|
||||||
- protect - True if re-inclusion wrappers should be created
|
|
||||||
- extensions - list of additional extensions to include in generated interfaces"""
|
|
||||||
|
|
||||||
# Create generator options with parameters specified on command line
|
|
||||||
makeGenOpts(args)
|
|
||||||
|
|
||||||
# pdb.set_trace()
|
|
||||||
|
|
||||||
# Select a generator matching the requested target
|
|
||||||
if args.target in genOpts:
|
|
||||||
createGenerator = genOpts[args.target][0]
|
|
||||||
options = genOpts[args.target][1]
|
|
||||||
|
|
||||||
logDiag('* Building', options.filename)
|
|
||||||
logDiag('* options.versions =', options.versions)
|
|
||||||
logDiag('* options.emitversions =', options.emitversions)
|
|
||||||
logDiag('* options.defaultExtensions =', options.defaultExtensions)
|
|
||||||
logDiag('* options.addExtensions =', options.addExtensions)
|
|
||||||
logDiag('* options.removeExtensions =', options.removeExtensions)
|
|
||||||
logDiag('* options.emitExtensions =', options.emitExtensions)
|
|
||||||
logDiag('* options.emitSpirv =', options.emitSpirv)
|
|
||||||
logDiag('* options.emitFormats =', options.emitFormats)
|
|
||||||
|
|
||||||
gen = createGenerator(errFile=errWarn,
|
|
||||||
warnFile=errWarn,
|
|
||||||
diagFile=diag)
|
|
||||||
return (gen, options)
|
|
||||||
else:
|
|
||||||
logErr('No generator options for unknown target:', args.target)
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
# -feature name
|
|
||||||
# -extension name
|
|
||||||
# For both, "name" may be a single name, or a space-separated list
|
|
||||||
# of names, or a regular expression.
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
|
|
||||||
parser.add_argument('-defaultExtensions', action='store',
|
|
||||||
default=APIConventions().xml_api_name,
|
|
||||||
help='Specify a single class of extensions to add to targets')
|
|
||||||
parser.add_argument('-extension', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify an extension or extensions to add to targets')
|
|
||||||
parser.add_argument('-removeExtensions', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify an extension or extensions to remove from targets')
|
|
||||||
parser.add_argument('-emitExtensions', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify an extension or extensions to emit in targets')
|
|
||||||
parser.add_argument('-emitSpirv', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify a SPIR-V extension or capability to emit in targets')
|
|
||||||
parser.add_argument('-emitFormats', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify Vulkan Formats to emit in targets')
|
|
||||||
parser.add_argument('-feature', action='append',
|
|
||||||
default=[],
|
|
||||||
help='Specify a core API feature name or names to add to targets')
|
|
||||||
parser.add_argument('-debug', action='store_true',
|
|
||||||
help='Enable debugging')
|
|
||||||
parser.add_argument('-dump', action='store_true',
|
|
||||||
help='Enable dump to stderr')
|
|
||||||
parser.add_argument('-diagfile', action='store',
|
|
||||||
default=None,
|
|
||||||
help='Write diagnostics to specified file')
|
|
||||||
parser.add_argument('-errfile', action='store',
|
|
||||||
default=None,
|
|
||||||
help='Write errors and warnings to specified file instead of stderr')
|
|
||||||
parser.add_argument('-noprotect', dest='protect', action='store_false',
|
|
||||||
help='Disable inclusion protection in output headers')
|
|
||||||
parser.add_argument('-profile', action='store_true',
|
|
||||||
help='Enable profiling')
|
|
||||||
parser.add_argument('-registry', action='store',
|
|
||||||
default='vk.xml',
|
|
||||||
help='Use specified registry file instead of vk.xml')
|
|
||||||
parser.add_argument('-time', action='store_true',
|
|
||||||
help='Enable timing')
|
|
||||||
parser.add_argument('-validate', action='store_true',
|
|
||||||
help='Validate the registry properties and exit')
|
|
||||||
parser.add_argument('-genpath', action='store', default='gen',
|
|
||||||
help='Path to generated files')
|
|
||||||
parser.add_argument('-o', action='store', dest='directory',
|
|
||||||
default='.',
|
|
||||||
help='Create target and related files in specified directory')
|
|
||||||
parser.add_argument('target', metavar='target', nargs='?',
|
|
||||||
help='Specify target')
|
|
||||||
parser.add_argument('-quiet', action='store_true', default=True,
|
|
||||||
help='Suppress script output during normal execution.')
|
|
||||||
parser.add_argument('-verbose', action='store_false', dest='quiet', default=True,
|
|
||||||
help='Enable script output during normal execution.')
|
|
||||||
parser.add_argument('-misracstyle', dest='misracstyle', action='store_true',
|
|
||||||
help='generate MISRA C-friendly headers')
|
|
||||||
parser.add_argument('-misracppstyle', dest='misracppstyle', action='store_true',
|
|
||||||
help='generate MISRA C++-friendly headers')
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
# This splits arguments which are space-separated lists
|
|
||||||
args.feature = [name for arg in args.feature for name in arg.split()]
|
|
||||||
args.extension = [name for arg in args.extension for name in arg.split()]
|
|
||||||
|
|
||||||
# create error/warning & diagnostic files
|
|
||||||
if args.errfile:
|
|
||||||
errWarn = open(args.errfile, 'w', encoding='utf-8')
|
|
||||||
else:
|
|
||||||
errWarn = sys.stderr
|
|
||||||
|
|
||||||
if args.diagfile:
|
|
||||||
diag = open(args.diagfile, 'w', encoding='utf-8')
|
|
||||||
else:
|
|
||||||
diag = None
|
|
||||||
|
|
||||||
if args.time:
|
|
||||||
# Log diagnostics and warnings
|
|
||||||
setLogFile(setDiag = True, setWarn = True, filename = '-')
|
|
||||||
|
|
||||||
(gen, options) = (None, None)
|
|
||||||
if not args.validate:
|
|
||||||
# Create the API generator & generator options
|
|
||||||
(gen, options) = genTarget(args)
|
|
||||||
|
|
||||||
# Create the registry object with the specified generator and generator
|
|
||||||
# options. The options are set before XML loading as they may affect it.
|
|
||||||
reg = Registry(gen, options)
|
|
||||||
|
|
||||||
# Parse the specified registry XML into an ElementTree object
|
|
||||||
startTimer(args.time)
|
|
||||||
tree = etree.parse(args.registry)
|
|
||||||
endTimer(args.time, '* Time to make ElementTree =')
|
|
||||||
|
|
||||||
# Load the XML tree into the registry object
|
|
||||||
startTimer(args.time)
|
|
||||||
reg.loadElementTree(tree)
|
|
||||||
endTimer(args.time, '* Time to parse ElementTree =')
|
|
||||||
|
|
||||||
if args.validate:
|
|
||||||
success = reg.validateRegistry()
|
|
||||||
sys.exit(0 if success else 1)
|
|
||||||
|
|
||||||
if args.dump:
|
|
||||||
logDiag('* Dumping registry to regdump.txt')
|
|
||||||
reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8'))
|
|
||||||
|
|
||||||
# Finally, use the output generator to create the requested target
|
|
||||||
if args.debug:
|
|
||||||
pdb.run('reg.apiGen()')
|
|
||||||
else:
|
|
||||||
startTimer(args.time)
|
|
||||||
reg.apiGen()
|
|
||||||
endTimer(args.time, '* Time to generate ' + options.filename + ' =')
|
|
||||||
|
|
||||||
if not args.quiet:
|
|
||||||
logDiag('* Generated', options.filename)
|
|
1575
registry/reg.py
1575
registry/reg.py
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
|||||||
"""Utility functions not closely tied to other spec_tools types."""
|
|
||||||
# Copyright 2018-2019 Collabora, Ltd.
|
|
||||||
# Copyright 2013-2022 The Khronos Group Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
|
|
||||||
def getElemName(elem, default=None):
|
|
||||||
"""Get the name associated with an element, either a name child or name attribute."""
|
|
||||||
name_elem = elem.find('name')
|
|
||||||
if name_elem is not None:
|
|
||||||
return name_elem.text
|
|
||||||
# Fallback if there is no child.
|
|
||||||
return elem.get('name', default)
|
|
||||||
|
|
||||||
|
|
||||||
def getElemType(elem, default=None):
|
|
||||||
"""Get the type associated with an element, either a type child or type attribute."""
|
|
||||||
type_elem = elem.find('type')
|
|
||||||
if type_elem is not None:
|
|
||||||
return type_elem.text
|
|
||||||
# Fallback if there is no child.
|
|
||||||
return elem.get('type', default)
|
|
||||||
|
|
||||||
|
|
||||||
def findFirstWithPredicate(collection, pred):
|
|
||||||
"""Return the first element that satisfies the predicate, or None if none exist.
|
|
||||||
|
|
||||||
NOTE: Some places where this is used might be better served by changing to a dictionary.
|
|
||||||
"""
|
|
||||||
for elt in collection:
|
|
||||||
if pred(elt):
|
|
||||||
return elt
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def findNamedElem(elems, name):
|
|
||||||
"""Traverse a collection of elements with 'name' nodes or attributes, looking for and returning one with the right name.
|
|
||||||
|
|
||||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
|
||||||
"""
|
|
||||||
return findFirstWithPredicate(elems, lambda elem: getElemName(elem) == name)
|
|
||||||
|
|
||||||
|
|
||||||
def findTypedElem(elems, typename):
|
|
||||||
"""Traverse a collection of elements with 'type' nodes or attributes, looking for and returning one with the right typename.
|
|
||||||
|
|
||||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
|
||||||
"""
|
|
||||||
return findFirstWithPredicate(elems, lambda elem: getElemType(elem) == typename)
|
|
||||||
|
|
||||||
|
|
||||||
def findNamedObject(collection, name):
|
|
||||||
"""Traverse a collection of elements with 'name' attributes, looking for and returning one with the right name.
|
|
||||||
|
|
||||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
|
||||||
"""
|
|
||||||
return findFirstWithPredicate(collection, lambda elt: elt.name == name)
|
|
49336
registry/validusage.json
49336
registry/validusage.json
File diff suppressed because one or more lines are too long
20429
registry/vk.xml
20429
registry/vk.xml
File diff suppressed because it is too large
Load Diff
@ -1,275 +0,0 @@
|
|||||||
#!/usr/bin/python3 -i
|
|
||||||
#
|
|
||||||
# Copyright 2013-2022 The Khronos Group Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
# Working-group-specific style conventions,
|
|
||||||
# used in generation.
|
|
||||||
|
|
||||||
import re
|
|
||||||
import os
|
|
||||||
|
|
||||||
from conventions import ConventionsBase
|
|
||||||
|
|
||||||
|
|
||||||
# Modified from default implementation - see category_requires_validation() below
|
|
||||||
CATEGORIES_REQUIRING_VALIDATION = set(('handle', 'enum', 'bitmask'))
|
|
||||||
|
|
||||||
# Tokenize into "words" for structure types, approximately per spec "Implicit Valid Usage" section 2.7.2
|
|
||||||
# This first set is for things we recognize explicitly as words,
|
|
||||||
# as exceptions to the general regex.
|
|
||||||
# Ideally these would be listed in the spec as exceptions, as OpenXR does.
|
|
||||||
SPECIAL_WORDS = set((
|
|
||||||
'16Bit', # VkPhysicalDevice16BitStorageFeatures
|
|
||||||
'8Bit', # VkPhysicalDevice8BitStorageFeaturesKHR
|
|
||||||
'AABB', # VkGeometryAABBNV
|
|
||||||
'ASTC', # VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
|
|
||||||
'D3D12', # VkD3D12FenceSubmitInfoKHR
|
|
||||||
'Float16', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
|
|
||||||
'ImagePipe', # VkImagePipeSurfaceCreateInfoFUCHSIA
|
|
||||||
'Int64', # VkPhysicalDeviceShaderAtomicInt64FeaturesKHR
|
|
||||||
'Int8', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
|
|
||||||
'MacOS', # VkMacOSSurfaceCreateInfoMVK
|
|
||||||
'RGBA10X6', # VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT
|
|
||||||
'Uint8', # VkPhysicalDeviceIndexTypeUint8FeaturesEXT
|
|
||||||
'Win32', # VkWin32SurfaceCreateInfoKHR
|
|
||||||
))
|
|
||||||
# A regex to match any of the SPECIAL_WORDS
|
|
||||||
EXCEPTION_PATTERN = r'(?P<exception>{})'.format(
|
|
||||||
'|'.join('(%s)' % re.escape(w) for w in SPECIAL_WORDS))
|
|
||||||
MAIN_RE = re.compile(
|
|
||||||
# the negative lookahead is to prevent the all-caps pattern from being too greedy.
|
|
||||||
r'({}|([0-9]+)|([A-Z][a-z]+)|([A-Z][A-Z]*(?![a-z])))'.format(EXCEPTION_PATTERN))
|
|
||||||
|
|
||||||
|
|
||||||
class VulkanConventions(ConventionsBase):
|
|
||||||
@property
|
|
||||||
def null(self):
|
|
||||||
"""Preferred spelling of NULL."""
|
|
||||||
return '`NULL`'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def struct_macro(self):
|
|
||||||
"""Get the appropriate format macro for a structure.
|
|
||||||
|
|
||||||
Primarily affects generated valid usage statements.
|
|
||||||
"""
|
|
||||||
|
|
||||||
return 'slink:'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def constFlagBits(self):
|
|
||||||
"""Returns True if static const flag bits should be generated, False if an enumerated type should be generated."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def structtype_member_name(self):
|
|
||||||
"""Return name of the structure type member"""
|
|
||||||
return 'sType'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def nextpointer_member_name(self):
|
|
||||||
"""Return name of the structure pointer chain member"""
|
|
||||||
return 'pNext'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def valid_pointer_prefix(self):
|
|
||||||
"""Return prefix to pointers which must themselves be valid"""
|
|
||||||
return 'valid'
|
|
||||||
|
|
||||||
def is_structure_type_member(self, paramtype, paramname):
|
|
||||||
"""Determine if member type and name match the structure type member."""
|
|
||||||
return paramtype == 'VkStructureType' and paramname == self.structtype_member_name
|
|
||||||
|
|
||||||
def is_nextpointer_member(self, paramtype, paramname):
|
|
||||||
"""Determine if member type and name match the next pointer chain member."""
|
|
||||||
return paramtype == 'void' and paramname == self.nextpointer_member_name
|
|
||||||
|
|
||||||
def generate_structure_type_from_name(self, structname):
|
|
||||||
"""Generate a structure type name, like VK_STRUCTURE_TYPE_CREATE_INSTANCE_INFO"""
|
|
||||||
|
|
||||||
structure_type_parts = []
|
|
||||||
# Tokenize into "words"
|
|
||||||
for elem in MAIN_RE.findall(structname):
|
|
||||||
word = elem[0]
|
|
||||||
if word == 'Vk':
|
|
||||||
structure_type_parts.append('VK_STRUCTURE_TYPE')
|
|
||||||
else:
|
|
||||||
structure_type_parts.append(word.upper())
|
|
||||||
name = '_'.join(structure_type_parts)
|
|
||||||
|
|
||||||
# The simple-minded rules need modification for some structure names
|
|
||||||
subpats = [
|
|
||||||
[ r'_H_(26[45])_', r'_H\1_' ],
|
|
||||||
[ r'_VULKAN_([0-9])([0-9])_', r'_VULKAN_\1_\2_' ],
|
|
||||||
[ r'_DIRECT_FB_', r'_DIRECTFB_' ],
|
|
||||||
]
|
|
||||||
|
|
||||||
for subpat in subpats:
|
|
||||||
name = re.sub(subpat[0], subpat[1], name)
|
|
||||||
return name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def warning_comment(self):
|
|
||||||
"""Return warning comment to be placed in header of generated Asciidoctor files"""
|
|
||||||
return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def file_suffix(self):
|
|
||||||
"""Return suffix of generated Asciidoctor files"""
|
|
||||||
return '.txt'
|
|
||||||
|
|
||||||
def api_name(self, spectype='api'):
|
|
||||||
"""Return API or specification name for citations in ref pages.ref
|
|
||||||
pages should link to for
|
|
||||||
|
|
||||||
spectype is the spec this refpage is for: 'api' is the Vulkan API
|
|
||||||
Specification. Defaults to 'api'. If an unrecognized spectype is
|
|
||||||
given, returns None.
|
|
||||||
"""
|
|
||||||
if spectype == 'api' or spectype is None:
|
|
||||||
return 'Vulkan'
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def api_prefix(self):
|
|
||||||
"""Return API token prefix"""
|
|
||||||
return 'VK_'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def write_contacts(self):
|
|
||||||
"""Return whether contact list should be written to extension appendices"""
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
|
||||||
def write_refpage_include(self):
|
|
||||||
"""Return whether refpage include should be written to extension appendices"""
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
|
||||||
def member_used_for_unique_vuid(self):
|
|
||||||
"""Return the member name used in the VUID-...-...-unique ID."""
|
|
||||||
return self.structtype_member_name
|
|
||||||
|
|
||||||
def is_externsync_command(self, protoname):
|
|
||||||
"""Returns True if the protoname element is an API command requiring
|
|
||||||
external synchronization
|
|
||||||
"""
|
|
||||||
return protoname is not None and 'vkCmd' in protoname
|
|
||||||
|
|
||||||
def is_api_name(self, name):
|
|
||||||
"""Returns True if name is in the reserved API namespace.
|
|
||||||
For Vulkan, these are names with a case-insensitive 'vk' prefix, or
|
|
||||||
a 'PFN_vk' function pointer type prefix.
|
|
||||||
"""
|
|
||||||
return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk'
|
|
||||||
|
|
||||||
def specURL(self, spectype='api'):
|
|
||||||
"""Return public registry URL which ref pages should link to for the
|
|
||||||
current all-extensions HTML specification, so xrefs in the
|
|
||||||
asciidoc source that are not to ref pages can link into it
|
|
||||||
instead. N.b. this may need to change on a per-refpage basis if
|
|
||||||
there are multiple documents involved.
|
|
||||||
"""
|
|
||||||
return 'https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def xml_api_name(self):
|
|
||||||
"""Return the name used in the default API XML registry for the default API"""
|
|
||||||
return 'vulkan'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def registry_path(self):
|
|
||||||
"""Return relpath to the default API XML registry in this project."""
|
|
||||||
return 'xml/vk.xml'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def specification_path(self):
|
|
||||||
"""Return relpath to the Asciidoctor specification sources in this project."""
|
|
||||||
return '{generated}/meta'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def special_use_section_anchor(self):
|
|
||||||
"""Return asciidoctor anchor name in the API Specification of the
|
|
||||||
section describing extension special uses in detail."""
|
|
||||||
return 'extendingvulkan-compatibility-specialuse'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def extra_refpage_headers(self):
|
|
||||||
"""Return any extra text to add to refpage headers."""
|
|
||||||
return 'include::{config}/attribs.txt[]'
|
|
||||||
|
|
||||||
@property
|
|
||||||
def extension_index_prefixes(self):
|
|
||||||
"""Return a list of extension prefixes used to group extension refpages."""
|
|
||||||
return ['VK_KHR', 'VK_EXT', 'VK']
|
|
||||||
|
|
||||||
@property
|
|
||||||
def unified_flag_refpages(self):
|
|
||||||
"""Return True if Flags/FlagBits refpages are unified, False if
|
|
||||||
they are separate.
|
|
||||||
"""
|
|
||||||
return False
|
|
||||||
|
|
||||||
@property
|
|
||||||
def spec_reflow_path(self):
|
|
||||||
"""Return the path to the spec source folder to reflow"""
|
|
||||||
return os.getcwd()
|
|
||||||
|
|
||||||
@property
|
|
||||||
def spec_no_reflow_dirs(self):
|
|
||||||
"""Return a set of directories not to automatically descend into
|
|
||||||
when reflowing spec text
|
|
||||||
"""
|
|
||||||
return ('scripts', 'style')
|
|
||||||
|
|
||||||
@property
|
|
||||||
def zero(self):
|
|
||||||
return '`0`'
|
|
||||||
|
|
||||||
def category_requires_validation(self, category):
|
|
||||||
"""Return True if the given type 'category' always requires validation.
|
|
||||||
|
|
||||||
Overridden because Vulkan does not require "valid" text for basetype
|
|
||||||
in the spec right now."""
|
|
||||||
return category in CATEGORIES_REQUIRING_VALIDATION
|
|
||||||
|
|
||||||
@property
|
|
||||||
def should_skip_checking_codes(self):
|
|
||||||
"""Return True if more than the basic validation of return codes should
|
|
||||||
be skipped for a command.
|
|
||||||
|
|
||||||
Vulkan mostly relies on the validation layers rather than API
|
|
||||||
builtin error checking, so these checks are not appropriate.
|
|
||||||
|
|
||||||
For example, passing in a VkFormat parameter will not potentially
|
|
||||||
generate a VK_ERROR_FORMAT_NOT_SUPPORTED code."""
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
def extension_include_string(self, ext):
|
|
||||||
"""Return format string for include:: line for an extension appendix
|
|
||||||
file. ext is an object with the following members:
|
|
||||||
- name - extension string string
|
|
||||||
- vendor - vendor portion of name
|
|
||||||
- barename - remainder of name"""
|
|
||||||
|
|
||||||
return 'include::{{appendices}}/{name}{suffix}[]'.format(
|
|
||||||
name=ext.name, suffix=self.file_suffix)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def refpage_generated_include_path(self):
|
|
||||||
"""Return path relative to the generated reference pages, to the
|
|
||||||
generated API include files."""
|
|
||||||
return "{generated}"
|
|
||||||
|
|
||||||
def valid_flag_bit(self, bitpos):
|
|
||||||
"""Return True if bitpos is an allowed numeric bit position for
|
|
||||||
an API flag bit.
|
|
||||||
|
|
||||||
Vulkan uses 32 bit Vk*Flags types, and assumes C compilers may
|
|
||||||
cause Vk*FlagBits values with bit 31 set to result in a 64 bit
|
|
||||||
enumerated type, so disallows such flags."""
|
|
||||||
return bitpos >= 0 and bitpos < 31
|
|
Loading…
x
Reference in New Issue
Block a user