xref: /aosp_15_r20/external/swiftshader/include/vulkan/vulkan_screen.h (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1*03ce13f7SAndroid Build Coastguard Worker #ifndef VULKAN_SCREEN_H_
2*03ce13f7SAndroid Build Coastguard Worker #define VULKAN_SCREEN_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_QNX_screen_surface is a preprocessor guard. Do not pass it to API calls.
23*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_screen_surface 1
24*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_SCREEN_SURFACE_SPEC_VERSION 1
25*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_SCREEN_SURFACE_EXTENSION_NAME "VK_QNX_screen_surface"
26*03ce13f7SAndroid Build Coastguard Worker typedef VkFlags VkScreenSurfaceCreateFlagsQNX;
27*03ce13f7SAndroid Build Coastguard Worker typedef struct VkScreenSurfaceCreateInfoQNX {
28*03ce13f7SAndroid Build Coastguard Worker     VkStructureType                  sType;
29*03ce13f7SAndroid Build Coastguard Worker     const void*                      pNext;
30*03ce13f7SAndroid Build Coastguard Worker     VkScreenSurfaceCreateFlagsQNX    flags;
31*03ce13f7SAndroid Build Coastguard Worker     struct _screen_context*          context;
32*03ce13f7SAndroid Build Coastguard Worker     struct _screen_window*           window;
33*03ce13f7SAndroid Build Coastguard Worker } VkScreenSurfaceCreateInfoQNX;
34*03ce13f7SAndroid Build Coastguard Worker 
35*03ce13f7SAndroid Build Coastguard Worker typedef VkResult (VKAPI_PTR *PFN_vkCreateScreenSurfaceQNX)(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
36*03ce13f7SAndroid Build Coastguard Worker typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window);
37*03ce13f7SAndroid Build Coastguard Worker 
38*03ce13f7SAndroid Build Coastguard Worker #ifndef VK_NO_PROTOTYPES
39*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(
40*03ce13f7SAndroid Build Coastguard Worker     VkInstance                                  instance,
41*03ce13f7SAndroid Build Coastguard Worker     const VkScreenSurfaceCreateInfoQNX*         pCreateInfo,
42*03ce13f7SAndroid Build Coastguard Worker     const VkAllocationCallbacks*                pAllocator,
43*03ce13f7SAndroid Build Coastguard Worker     VkSurfaceKHR*                               pSurface);
44*03ce13f7SAndroid Build Coastguard Worker 
45*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(
46*03ce13f7SAndroid Build Coastguard Worker     VkPhysicalDevice                            physicalDevice,
47*03ce13f7SAndroid Build Coastguard Worker     uint32_t                                    queueFamilyIndex,
48*03ce13f7SAndroid Build Coastguard Worker     struct _screen_window*                      window);
49*03ce13f7SAndroid Build Coastguard Worker #endif
50*03ce13f7SAndroid Build Coastguard Worker 
51*03ce13f7SAndroid Build Coastguard Worker 
52*03ce13f7SAndroid Build Coastguard Worker // VK_QNX_external_memory_screen_buffer is a preprocessor guard. Do not pass it to API calls.
53*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_external_memory_screen_buffer 1
54*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_SPEC_VERSION 1
55*03ce13f7SAndroid Build Coastguard Worker #define VK_QNX_EXTERNAL_MEMORY_SCREEN_BUFFER_EXTENSION_NAME "VK_QNX_external_memory_screen_buffer"
56*03ce13f7SAndroid Build Coastguard Worker typedef struct VkScreenBufferPropertiesQNX {
57*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
58*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
59*03ce13f7SAndroid Build Coastguard Worker     VkDeviceSize       allocationSize;
60*03ce13f7SAndroid Build Coastguard Worker     uint32_t           memoryTypeBits;
61*03ce13f7SAndroid Build Coastguard Worker } VkScreenBufferPropertiesQNX;
62*03ce13f7SAndroid Build Coastguard Worker 
63*03ce13f7SAndroid Build Coastguard Worker typedef struct VkScreenBufferFormatPropertiesQNX {
64*03ce13f7SAndroid Build Coastguard Worker     VkStructureType                  sType;
65*03ce13f7SAndroid Build Coastguard Worker     void*                            pNext;
66*03ce13f7SAndroid Build Coastguard Worker     VkFormat                         format;
67*03ce13f7SAndroid Build Coastguard Worker     uint64_t                         externalFormat;
68*03ce13f7SAndroid Build Coastguard Worker     uint64_t                         screenUsage;
69*03ce13f7SAndroid Build Coastguard Worker     VkFormatFeatureFlags             formatFeatures;
70*03ce13f7SAndroid Build Coastguard Worker     VkComponentMapping               samplerYcbcrConversionComponents;
71*03ce13f7SAndroid Build Coastguard Worker     VkSamplerYcbcrModelConversion    suggestedYcbcrModel;
72*03ce13f7SAndroid Build Coastguard Worker     VkSamplerYcbcrRange              suggestedYcbcrRange;
73*03ce13f7SAndroid Build Coastguard Worker     VkChromaLocation                 suggestedXChromaOffset;
74*03ce13f7SAndroid Build Coastguard Worker     VkChromaLocation                 suggestedYChromaOffset;
75*03ce13f7SAndroid Build Coastguard Worker } VkScreenBufferFormatPropertiesQNX;
76*03ce13f7SAndroid Build Coastguard Worker 
77*03ce13f7SAndroid Build Coastguard Worker typedef struct VkImportScreenBufferInfoQNX {
78*03ce13f7SAndroid Build Coastguard Worker     VkStructureType           sType;
79*03ce13f7SAndroid Build Coastguard Worker     const void*               pNext;
80*03ce13f7SAndroid Build Coastguard Worker     struct _screen_buffer*    buffer;
81*03ce13f7SAndroid Build Coastguard Worker } VkImportScreenBufferInfoQNX;
82*03ce13f7SAndroid Build Coastguard Worker 
83*03ce13f7SAndroid Build Coastguard Worker typedef struct VkExternalFormatQNX {
84*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
85*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
86*03ce13f7SAndroid Build Coastguard Worker     uint64_t           externalFormat;
87*03ce13f7SAndroid Build Coastguard Worker } VkExternalFormatQNX;
88*03ce13f7SAndroid Build Coastguard Worker 
89*03ce13f7SAndroid Build Coastguard Worker typedef struct VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX {
90*03ce13f7SAndroid Build Coastguard Worker     VkStructureType    sType;
91*03ce13f7SAndroid Build Coastguard Worker     void*              pNext;
92*03ce13f7SAndroid Build Coastguard Worker     VkBool32           screenBufferImport;
93*03ce13f7SAndroid Build Coastguard Worker } VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX;
94*03ce13f7SAndroid Build Coastguard Worker 
95*03ce13f7SAndroid Build Coastguard Worker typedef VkResult (VKAPI_PTR *PFN_vkGetScreenBufferPropertiesQNX)(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties);
96*03ce13f7SAndroid Build Coastguard Worker 
97*03ce13f7SAndroid Build Coastguard Worker #ifndef VK_NO_PROTOTYPES
98*03ce13f7SAndroid Build Coastguard Worker VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX(
99*03ce13f7SAndroid Build Coastguard Worker     VkDevice                                    device,
100*03ce13f7SAndroid Build Coastguard Worker     const struct _screen_buffer*                buffer,
101*03ce13f7SAndroid Build Coastguard Worker     VkScreenBufferPropertiesQNX*                pProperties);
102*03ce13f7SAndroid Build Coastguard Worker #endif
103*03ce13f7SAndroid Build Coastguard Worker 
104*03ce13f7SAndroid Build Coastguard Worker #ifdef __cplusplus
105*03ce13f7SAndroid Build Coastguard Worker }
106*03ce13f7SAndroid Build Coastguard Worker #endif
107*03ce13f7SAndroid Build Coastguard Worker 
108*03ce13f7SAndroid Build Coastguard Worker #endif
109