• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2016 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // vk_headers:
7 //    This file should be included to ensure the vulkan headers are included
8 //
9 
10 #ifndef LIBANGLE_RENDERER_VULKAN_VK_HEADERS_H_
11 #define LIBANGLE_RENDERER_VULKAN_VK_HEADERS_H_
12 
13 #if ANGLE_SHARED_LIBVULKAN
14 #    include "third_party/volk/volk.h"
15 #else
16 #    include <vulkan/vulkan.h>
17 #endif
18 
19 // For the unreleased VK_EXT_multisampled_render_to_single_sampled
20 #if !defined(VK_EXT_multisampled_render_to_single_sampled)
21 #    define VK_EXT_multisampled_render_to_single_sampled 1
22 #    define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_SPEC_VERSION 1
23 #    define VK_EXT_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_EXTENSION_NAME \
24         "VK_GOOGLEX_multisampled_render_to_single_sampled"
25 
26 #    define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT \
27         ((VkStructureType)(1000376000))
28 #    define VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT \
29         ((VkStructureType)(1000376001))
30 
31 typedef struct VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
32 {
33     VkStructureType sType;
34     const void *pNext;
35     VkBool32 multisampledRenderToSingleSampled;
36 } VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT;
37 
38 typedef struct VkMultisampledRenderToSingleSampledInfoEXT
39 {
40     VkStructureType sType;
41     const void *pNext;
42     VkBool32 multisampledRenderToSingleSampledEnable;
43     VkSampleCountFlagBits rasterizationSamples;
44     VkResolveModeFlagBits depthResolveMode;
45     VkResolveModeFlagBits stencilResolveMode;
46 } VkMultisampledRenderToSingleSampledInfoEXT;
47 #endif /* VK_EXT_multisampled_render_to_single_sampled */
48 
49 #if !defined(ANGLE_SHARED_LIBVULKAN)
50 
51 namespace rx
52 {
53 // VK_EXT_debug_utils
54 extern PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT;
55 extern PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT;
56 extern PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT;
57 extern PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT;
58 extern PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT;
59 
60 // VK_EXT_debug_report
61 extern PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT;
62 extern PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT;
63 
64 // VK_KHR_get_physical_device_properties2
65 extern PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR;
66 extern PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR;
67 extern PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR;
68 
69 // VK_KHR_external_semaphore_fd
70 extern PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR;
71 
72 // VK_EXT_external_memory_host
73 extern PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT;
74 
75 // VK_EXT_host_query_reset
76 extern PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT;
77 
78 // VK_EXT_transform_feedback
79 extern PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT;
80 extern PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT;
81 extern PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT;
82 extern PFN_vkCmdBeginQueryIndexedEXT vkCmdBeginQueryIndexedEXT;
83 extern PFN_vkCmdEndQueryIndexedEXT vkCmdEndQueryIndexedEXT;
84 extern PFN_vkCmdDrawIndirectByteCountEXT vkCmdDrawIndirectByteCountEXT;
85 
86 // VK_KHR_get_memory_requirements2
87 extern PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
88 extern PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
89 
90 // VK_KHR_bind_memory2
91 extern PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR;
92 extern PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR;
93 
94 // VK_KHR_external_fence_capabilities
95 extern PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR
96     vkGetPhysicalDeviceExternalFencePropertiesKHR;
97 
98 // VK_KHR_external_fence_fd
99 extern PFN_vkGetFenceFdKHR vkGetFenceFdKHR;
100 extern PFN_vkImportFenceFdKHR vkImportFenceFdKHR;
101 
102 // VK_KHR_external_semaphore_capabilities
103 extern PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR
104     vkGetPhysicalDeviceExternalSemaphorePropertiesKHR;
105 
106 // VK_KHR_sampler_ycbcr_conversion
107 extern PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR;
108 extern PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR;
109 
110 // VK_KHR_create_renderpass2
111 extern PFN_vkCreateRenderPass2KHR vkCreateRenderPass2KHR;
112 
113 #    if defined(ANGLE_PLATFORM_FUCHSIA)
114 // VK_FUCHSIA_imagepipe_surface
115 extern PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA;
116 #    endif
117 
118 #    if defined(ANGLE_PLATFORM_ANDROID)
119 extern PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID;
120 extern PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID;
121 #    endif
122 
123 #    if defined(ANGLE_PLATFORM_GGP)
124 extern PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP;
125 #    endif  // defined(ANGLE_PLATFORM_GGP)
126 
127 // VK_KHR_shared_presentable_image
128 extern PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR;
129 
130 }  // namespace rx
131 
132 #endif  // ANGLE_SHARED_LIBVULKAN
133 
134 #endif  // LIBANGLE_RENDERER_VULKAN_VK_HEADERS_H_
135