xref: /aosp_15_r20/external/swiftshader/include/vulkan/vulkan_beta.h (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1*03ce13f7SAndroid Build Coastguard Worker #ifndef VULKAN_BETA_H_
2*03ce13f7SAndroid Build Coastguard Worker #define VULKAN_BETA_H_ 1
3*03ce13f7SAndroid Build Coastguard Worker 
4*03ce13f7SAndroid Build Coastguard Worker /*
5*03ce13f7SAndroid Build Coastguard Worker ** Copyright 2015-2024 The Khronos Group Inc.
6*03ce13f7SAndroid Build Coastguard Worker **
7*03ce13f7SAndroid Build Coastguard Worker ** SPDX-License-Identifier: Apache-2.0
8*03ce13f7SAndroid Build Coastguard Worker */
9*03ce13f7SAndroid Build Coastguard Worker 
10*03ce13f7SAndroid Build Coastguard Worker /*
11*03ce13f7SAndroid Build Coastguard Worker ** This header is generated from the Khronos Vulkan XML API Registry.
12*03ce13f7SAndroid Build Coastguard Worker **
13*03ce13f7SAndroid Build Coastguard Worker */
14*03ce13f7SAndroid Build Coastguard Worker 
15*03ce13f7SAndroid Build Coastguard Worker 
16*03ce13f7SAndroid Build Coastguard Worker #ifdef __cplusplus
17*03ce13f7SAndroid Build Coastguard Worker extern "C" {
18*03ce13f7SAndroid Build Coastguard Worker #endif
19*03ce13f7SAndroid Build Coastguard Worker 
20*03ce13f7SAndroid Build Coastguard Worker 
21*03ce13f7SAndroid Build Coastguard Worker 
22*03ce13f7SAndroid Build Coastguard Worker // VK_KHR_portability_subset is a preprocessor guard. Do not pass it to API calls.
23*03ce13f7SAndroid Build Coastguard Worker #define VK_KHR_portability_subset 1
24*03ce13f7SAndroid Build Coastguard Worker #define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
25*03ce13f7SAndroid Build Coastguard Worker #define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
26*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR {
27*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
28*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
29*03ce13f7SAndroid Build Coastguard Worker     VkBool32           constantAlphaColorBlendFactors;
30*03ce13f7SAndroid Build Coastguard Worker     VkBool32           events;
31*03ce13f7SAndroid Build Coastguard Worker     VkBool32           imageViewFormatReinterpretation;
32*03ce13f7SAndroid Build Coastguard Worker     VkBool32           imageViewFormatSwizzle;
33*03ce13f7SAndroid Build Coastguard Worker     VkBool32           imageView2DOn3DImage;
34*03ce13f7SAndroid Build Coastguard Worker     VkBool32           multisampleArrayImage;
35*03ce13f7SAndroid Build Coastguard Worker     VkBool32           mutableComparisonSamplers;
36*03ce13f7SAndroid Build Coastguard Worker     VkBool32           pointPolygons;
37*03ce13f7SAndroid Build Coastguard Worker     VkBool32           samplerMipLodBias;
38*03ce13f7SAndroid Build Coastguard Worker     VkBool32           separateStencilMaskRef;
39*03ce13f7SAndroid Build Coastguard Worker     VkBool32           shaderSampleRateInterpolationFunctions;
40*03ce13f7SAndroid Build Coastguard Worker     VkBool32           tessellationIsolines;
41*03ce13f7SAndroid Build Coastguard Worker     VkBool32           tessellationPointMode;
42*03ce13f7SAndroid Build Coastguard Worker     VkBool32           triangleFans;
43*03ce13f7SAndroid Build Coastguard Worker     VkBool32           vertexAttributeAccessBeyondStride;
44*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDevicePortabilitySubsetFeaturesKHR;
45*03ce13f7SAndroid Build Coastguard Worker 
46*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
47*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
48*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
49*03ce13f7SAndroid Build Coastguard Worker     uint32_t           minVertexInputBindingStrideAlignment;
50*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDevicePortabilitySubsetPropertiesKHR;
51*03ce13f7SAndroid Build Coastguard Worker 
52*03ce13f7SAndroid Build Coastguard Worker 
53*03ce13f7SAndroid Build Coastguard Worker 
54*03ce13f7SAndroid Build Coastguard Worker // VK_AMDX_shader_enqueue is a preprocessor guard. Do not pass it to API calls.
55*03ce13f7SAndroid Build Coastguard Worker #define VK_AMDX_shader_enqueue 1
56*03ce13f7SAndroid Build Coastguard Worker #define VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION 1
57*03ce13f7SAndroid Build Coastguard Worker #define VK_AMDX_SHADER_ENQUEUE_EXTENSION_NAME "VK_AMDX_shader_enqueue"
58*03ce13f7SAndroid Build Coastguard Worker #define VK_SHADER_INDEX_UNUSED_AMDX       (~0U)
59*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDeviceShaderEnqueueFeaturesAMDX {
60*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
61*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
62*03ce13f7SAndroid Build Coastguard Worker     VkBool32           shaderEnqueue;
63*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDeviceShaderEnqueueFeaturesAMDX;
64*03ce13f7SAndroid Build Coastguard Worker 
65*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDeviceShaderEnqueuePropertiesAMDX {
66*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
67*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
68*03ce13f7SAndroid Build Coastguard Worker     uint32_t           maxExecutionGraphDepth;
69*03ce13f7SAndroid Build Coastguard Worker     uint32_t           maxExecutionGraphShaderOutputNodes;
70*03ce13f7SAndroid Build Coastguard Worker     uint32_t           maxExecutionGraphShaderPayloadSize;
71*03ce13f7SAndroid Build Coastguard Worker     uint32_t           maxExecutionGraphShaderPayloadCount;
72*03ce13f7SAndroid Build Coastguard Worker     uint32_t           executionGraphDispatchAddressAlignment;
73*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDeviceShaderEnqueuePropertiesAMDX;
74*03ce13f7SAndroid Build Coastguard Worker 
75*03ce13f7SAndroid Build Coastguard Worker typedef struct VkExecutionGraphPipelineScratchSizeAMDX {
76*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
77*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
78*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize       size;
79*03ce13f7SAndroid Build Coastguard Worker } VkExecutionGraphPipelineScratchSizeAMDX;
80*03ce13f7SAndroid Build Coastguard Worker 
81*03ce13f7SAndroid Build Coastguard Worker typedef struct VkExecutionGraphPipelineCreateInfoAMDX {
82*03ce13f7SAndroid Build Coastguard Worker     VkStructureType                           sType;
83*03ce13f7SAndroid Build Coastguard Worker     const void*                               pNext;
84*03ce13f7SAndroid Build Coastguard Worker     VkPipelineCreateFlags                     flags;
85*03ce13f7SAndroid Build Coastguard Worker     uint32_t                                  stageCount;
86*03ce13f7SAndroid Build Coastguard Worker     const VkPipelineShaderStageCreateInfo*    pStages;
87*03ce13f7SAndroid Build Coastguard Worker     const VkPipelineLibraryCreateInfoKHR*     pLibraryInfo;
88*03ce13f7SAndroid Build Coastguard Worker     VkPipelineLayout                          layout;
89*03ce13f7SAndroid Build Coastguard Worker     VkPipeline                                basePipelineHandle;
90*03ce13f7SAndroid Build Coastguard Worker     int32_t                                   basePipelineIndex;
91*03ce13f7SAndroid Build Coastguard Worker } VkExecutionGraphPipelineCreateInfoAMDX;
92*03ce13f7SAndroid Build Coastguard Worker 
93*03ce13f7SAndroid Build Coastguard Worker typedef union VkDeviceOrHostAddressConstAMDX {
94*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress    deviceAddress;
95*03ce13f7SAndroid Build Coastguard Worker     const void*        hostAddress;
96*03ce13f7SAndroid Build Coastguard Worker } VkDeviceOrHostAddressConstAMDX;
97*03ce13f7SAndroid Build Coastguard Worker 
98*03ce13f7SAndroid Build Coastguard Worker typedef struct VkDispatchGraphInfoAMDX {
99*03ce13f7SAndroid Build Coastguard Worker     uint32_t                          nodeIndex;
100*03ce13f7SAndroid Build Coastguard Worker     uint32_t                          payloadCount;
101*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstAMDX    payloads;
102*03ce13f7SAndroid Build Coastguard Worker     uint64_t                          payloadStride;
103*03ce13f7SAndroid Build Coastguard Worker } VkDispatchGraphInfoAMDX;
104*03ce13f7SAndroid Build Coastguard Worker 
105*03ce13f7SAndroid Build Coastguard Worker typedef struct VkDispatchGraphCountInfoAMDX {
106*03ce13f7SAndroid Build Coastguard Worker     uint32_t                          count;
107*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstAMDX    infos;
108*03ce13f7SAndroid Build Coastguard Worker     uint64_t                          stride;
109*03ce13f7SAndroid Build Coastguard Worker } VkDispatchGraphCountInfoAMDX;
110*03ce13f7SAndroid Build Coastguard Worker 
111*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPipelineShaderStageNodeCreateInfoAMDX {
112*03ce13f7SAndroid Build Coastguard Worker       VkStructureType    sType;
113*03ce13f7SAndroid Build Coastguard Worker     const void*          pNext;
114*03ce13f7SAndroid Build Coastguard Worker     const char*          pName;
115*03ce13f7SAndroid Build Coastguard Worker     uint32_t             index;
116*03ce13f7SAndroid Build Coastguard Worker } VkPipelineShaderStageNodeCreateInfoAMDX;
117*03ce13f7SAndroid Build Coastguard Worker 
118*03ce13f7SAndroid Build Coastguard Worker typedef VkResult (VKAPI_PTR *PFN_vkCreateExecutionGraphPipelinesAMDX)(VkDevice                                        device, VkPipelineCache                 pipelineCache, uint32_t                                        createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks*    pAllocator, VkPipeline*               pPipelines);
119*03ce13f7SAndroid Build Coastguard Worker typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice                                        device, VkPipeline                                      executionGraph, VkExecutionGraphPipelineScratchSizeAMDX*         pSizeInfo);
120*03ce13f7SAndroid Build Coastguard Worker typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice                                        device, VkPipeline                                      executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX*   pNodeInfo, uint32_t*                                       pNodeIndex);
121*03ce13f7SAndroid Build Coastguard Worker typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer                                 commandBuffer, VkDeviceAddress                                 scratch);
122*03ce13f7SAndroid Build Coastguard Worker typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphAMDX)(VkCommandBuffer                                 commandBuffer, VkDeviceAddress                                 scratch, const VkDispatchGraphCountInfoAMDX*              pCountInfo);
123*03ce13f7SAndroid Build Coastguard Worker typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectAMDX)(VkCommandBuffer                                 commandBuffer, VkDeviceAddress                                 scratch, const VkDispatchGraphCountInfoAMDX*              pCountInfo);
124*03ce13f7SAndroid Build Coastguard Worker typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer                                 commandBuffer, VkDeviceAddress                                 scratch, VkDeviceAddress                                 countInfo);
125*03ce13f7SAndroid Build Coastguard Worker 
126*03ce13f7SAndroid Build Coastguard Worker #ifndef VK_NO_PROTOTYPES
127*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX(
128*03ce13f7SAndroid Build Coastguard Worker     VkDevice                                    device,
129*03ce13f7SAndroid Build Coastguard Worker     VkPipelineCache                             pipelineCache,
130*03ce13f7SAndroid Build Coastguard Worker     uint32_t                                    createInfoCount,
131*03ce13f7SAndroid Build Coastguard Worker     const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos,
132*03ce13f7SAndroid Build Coastguard Worker     const VkAllocationCallbacks*                pAllocator,
133*03ce13f7SAndroid Build Coastguard Worker     VkPipeline*                                 pPipelines);
134*03ce13f7SAndroid Build Coastguard Worker 
135*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineScratchSizeAMDX(
136*03ce13f7SAndroid Build Coastguard Worker     VkDevice                                    device,
137*03ce13f7SAndroid Build Coastguard Worker     VkPipeline                                  executionGraph,
138*03ce13f7SAndroid Build Coastguard Worker     VkExecutionGraphPipelineScratchSizeAMDX*    pSizeInfo);
139*03ce13f7SAndroid Build Coastguard Worker 
140*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX(
141*03ce13f7SAndroid Build Coastguard Worker     VkDevice                                    device,
142*03ce13f7SAndroid Build Coastguard Worker     VkPipeline                                  executionGraph,
143*03ce13f7SAndroid Build Coastguard Worker     const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo,
144*03ce13f7SAndroid Build Coastguard Worker     uint32_t*                                   pNodeIndex);
145*03ce13f7SAndroid Build Coastguard Worker 
146*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX(
147*03ce13f7SAndroid Build Coastguard Worker     VkCommandBuffer                             commandBuffer,
148*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress                             scratch);
149*03ce13f7SAndroid Build Coastguard Worker 
150*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX(
151*03ce13f7SAndroid Build Coastguard Worker     VkCommandBuffer                             commandBuffer,
152*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress                             scratch,
153*03ce13f7SAndroid Build Coastguard Worker     const VkDispatchGraphCountInfoAMDX*         pCountInfo);
154*03ce13f7SAndroid Build Coastguard Worker 
155*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX(
156*03ce13f7SAndroid Build Coastguard Worker     VkCommandBuffer                             commandBuffer,
157*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress                             scratch,
158*03ce13f7SAndroid Build Coastguard Worker     const VkDispatchGraphCountInfoAMDX*         pCountInfo);
159*03ce13f7SAndroid Build Coastguard Worker 
160*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX(
161*03ce13f7SAndroid Build Coastguard Worker     VkCommandBuffer                             commandBuffer,
162*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress                             scratch,
163*03ce13f7SAndroid Build Coastguard Worker     VkDeviceAddress                             countInfo);
164*03ce13f7SAndroid Build Coastguard Worker #endif
165*03ce13f7SAndroid Build Coastguard Worker 
166*03ce13f7SAndroid Build Coastguard Worker 
167*03ce13f7SAndroid Build Coastguard Worker // VK_NV_displacement_micromap is a preprocessor guard. Do not pass it to API calls.
168*03ce13f7SAndroid Build Coastguard Worker #define VK_NV_displacement_micromap 1
169*03ce13f7SAndroid Build Coastguard Worker #define VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION 2
170*03ce13f7SAndroid Build Coastguard Worker #define VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME "VK_NV_displacement_micromap"
171*03ce13f7SAndroid Build Coastguard Worker 
172*03ce13f7SAndroid Build Coastguard Worker typedef enum VkDisplacementMicromapFormatNV {
173*03ce13f7SAndroid Build Coastguard Worker     VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1,
174*03ce13f7SAndroid Build Coastguard Worker     VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2,
175*03ce13f7SAndroid Build Coastguard Worker     VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3,
176*03ce13f7SAndroid Build Coastguard Worker     VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV = 0x7FFFFFFF
177*03ce13f7SAndroid Build Coastguard Worker } VkDisplacementMicromapFormatNV;
178*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDeviceDisplacementMicromapFeaturesNV {
179*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
180*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
181*03ce13f7SAndroid Build Coastguard Worker     VkBool32           displacementMicromap;
182*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDeviceDisplacementMicromapFeaturesNV;
183*03ce13f7SAndroid Build Coastguard Worker 
184*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDeviceDisplacementMicromapPropertiesNV {
185*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
186*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
187*03ce13f7SAndroid Build Coastguard Worker     uint32_t           maxDisplacementMicromapSubdivisionLevel;
188*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDeviceDisplacementMicromapPropertiesNV;
189*03ce13f7SAndroid Build Coastguard Worker 
190*03ce13f7SAndroid Build Coastguard Worker typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV {
191*03ce13f7SAndroid Build Coastguard Worker     VkStructureType                     sType;
192*03ce13f7SAndroid Build Coastguard Worker     void*                               pNext;
193*03ce13f7SAndroid Build Coastguard Worker     VkFormat                            displacementBiasAndScaleFormat;
194*03ce13f7SAndroid Build Coastguard Worker     VkFormat                            displacementVectorFormat;
195*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstKHR       displacementBiasAndScaleBuffer;
196*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize                        displacementBiasAndScaleStride;
197*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstKHR       displacementVectorBuffer;
198*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize                        displacementVectorStride;
199*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstKHR       displacedMicromapPrimitiveFlags;
200*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize                        displacedMicromapPrimitiveFlagsStride;
201*03ce13f7SAndroid Build Coastguard Worker     VkIndexType                         indexType;
202*03ce13f7SAndroid Build Coastguard Worker     VkDeviceOrHostAddressConstKHR       indexBuffer;
203*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize                        indexStride;
204*03ce13f7SAndroid Build Coastguard Worker     uint32_t                            baseTriangle;
205*03ce13f7SAndroid Build Coastguard Worker     uint32_t                            usageCountsCount;
206*03ce13f7SAndroid Build Coastguard Worker     const VkMicromapUsageEXT*           pUsageCounts;
207*03ce13f7SAndroid Build Coastguard Worker     const VkMicromapUsageEXT* const*    ppUsageCounts;
208*03ce13f7SAndroid Build Coastguard Worker     VkMicromapEXT                       micromap;
209*03ce13f7SAndroid Build Coastguard Worker } VkAccelerationStructureTrianglesDisplacementMicromapNV;
210*03ce13f7SAndroid Build Coastguard Worker 
211*03ce13f7SAndroid Build Coastguard Worker 
212*03ce13f7SAndroid Build Coastguard Worker #ifdef __cplusplus
213*03ce13f7SAndroid Build Coastguard Worker }
214*03ce13f7SAndroid Build Coastguard Worker #endif
215*03ce13f7SAndroid Build Coastguard Worker 
216*03ce13f7SAndroid Build Coastguard Worker #endif
217