winspool/tests: Add tests for GetFormA().
[wine.git] / dlls / wined3d / wined3d_vk.h
bloba417a795901f66b2b90f4af816ad0cd8c8fbe1b6
1 /*
2 * Copyright 2018 Józef Kucia for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WINED3D_VK_H
20 #define __WINE_WINED3D_VK_H
22 #define VK_NO_PROTOTYPES
23 #ifndef USE_WIN32_VULKAN
24 #define WINE_VK_HOST
25 #endif
26 #include "wine/vulkan.h"
28 #define VK_INSTANCE_FUNCS() \
29 VK_INSTANCE_PFN(vkCreateDevice) \
30 VK_INSTANCE_PFN(vkDestroyInstance) \
31 VK_INSTANCE_PFN(vkEnumerateDeviceExtensionProperties) \
32 VK_INSTANCE_PFN(vkEnumerateDeviceLayerProperties) \
33 VK_INSTANCE_PFN(vkEnumeratePhysicalDevices) \
34 VK_INSTANCE_PFN(vkGetDeviceProcAddr) \
35 VK_INSTANCE_PFN(vkGetPhysicalDeviceFeatures) \
36 VK_INSTANCE_PFN(vkGetPhysicalDeviceFormatProperties) \
37 VK_INSTANCE_PFN(vkGetPhysicalDeviceImageFormatProperties) \
38 VK_INSTANCE_PFN(vkGetPhysicalDeviceMemoryProperties) \
39 VK_INSTANCE_PFN(vkGetPhysicalDeviceProperties) \
40 VK_INSTANCE_PFN(vkGetPhysicalDeviceQueueFamilyProperties) \
41 VK_INSTANCE_PFN(vkGetPhysicalDeviceSparseImageFormatProperties) \
42 /* Vulkan 1.1 */ \
43 VK_INSTANCE_EXT_PFN(vkGetPhysicalDeviceFeatures2) \
44 VK_INSTANCE_EXT_PFN(vkGetPhysicalDeviceProperties2) \
45 /* VK_KHR_surface */ \
46 VK_INSTANCE_PFN(vkDestroySurfaceKHR) \
47 VK_INSTANCE_PFN(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \
48 VK_INSTANCE_PFN(vkGetPhysicalDeviceSurfaceFormatsKHR) \
49 VK_INSTANCE_PFN(vkGetPhysicalDeviceSurfacePresentModesKHR) \
50 VK_INSTANCE_PFN(vkGetPhysicalDeviceSurfaceSupportKHR) \
51 /* VK_KHR_win32_surface */ \
52 VK_INSTANCE_PFN(vkCreateWin32SurfaceKHR)
54 #define VK_DEVICE_FUNCS() \
55 VK_DEVICE_PFN(vkAllocateCommandBuffers) \
56 VK_DEVICE_PFN(vkAllocateDescriptorSets) \
57 VK_DEVICE_PFN(vkAllocateMemory) \
58 VK_DEVICE_PFN(vkBeginCommandBuffer) \
59 VK_DEVICE_PFN(vkBindBufferMemory) \
60 VK_DEVICE_PFN(vkBindImageMemory) \
61 VK_DEVICE_PFN(vkCmdBeginQuery) \
62 VK_DEVICE_PFN(vkCmdBeginRenderPass) \
63 VK_DEVICE_PFN(vkCmdBindDescriptorSets) \
64 VK_DEVICE_PFN(vkCmdBindIndexBuffer) \
65 VK_DEVICE_PFN(vkCmdBindPipeline) \
66 VK_DEVICE_PFN(vkCmdBindVertexBuffers) \
67 VK_DEVICE_PFN(vkCmdBlitImage) \
68 VK_DEVICE_PFN(vkCmdClearAttachments) \
69 VK_DEVICE_PFN(vkCmdClearColorImage) \
70 VK_DEVICE_PFN(vkCmdClearDepthStencilImage) \
71 VK_DEVICE_PFN(vkCmdCopyBuffer) \
72 VK_DEVICE_PFN(vkCmdCopyBufferToImage) \
73 VK_DEVICE_PFN(vkCmdCopyImage) \
74 VK_DEVICE_PFN(vkCmdCopyImageToBuffer) \
75 VK_DEVICE_PFN(vkCmdCopyQueryPoolResults) \
76 VK_DEVICE_PFN(vkCmdDispatch) \
77 VK_DEVICE_PFN(vkCmdDispatchIndirect) \
78 VK_DEVICE_PFN(vkCmdDraw) \
79 VK_DEVICE_PFN(vkCmdDrawIndexed) \
80 VK_DEVICE_PFN(vkCmdDrawIndexedIndirect) \
81 VK_DEVICE_PFN(vkCmdDrawIndirect) \
82 VK_DEVICE_PFN(vkCmdEndQuery) \
83 VK_DEVICE_PFN(vkCmdEndRenderPass) \
84 VK_DEVICE_PFN(vkCmdExecuteCommands) \
85 VK_DEVICE_PFN(vkCmdFillBuffer) \
86 VK_DEVICE_PFN(vkCmdNextSubpass) \
87 VK_DEVICE_PFN(vkCmdPipelineBarrier) \
88 VK_DEVICE_PFN(vkCmdPushConstants) \
89 VK_DEVICE_PFN(vkCmdResetEvent) \
90 VK_DEVICE_PFN(vkCmdResetQueryPool) \
91 VK_DEVICE_PFN(vkCmdResolveImage) \
92 VK_DEVICE_PFN(vkCmdSetBlendConstants) \
93 VK_DEVICE_PFN(vkCmdSetDepthBias) \
94 VK_DEVICE_PFN(vkCmdSetDepthBounds) \
95 VK_DEVICE_PFN(vkCmdSetEvent) \
96 VK_DEVICE_PFN(vkCmdSetLineWidth) \
97 VK_DEVICE_PFN(vkCmdSetScissor) \
98 VK_DEVICE_PFN(vkCmdSetStencilCompareMask) \
99 VK_DEVICE_PFN(vkCmdSetStencilReference) \
100 VK_DEVICE_PFN(vkCmdSetStencilWriteMask) \
101 VK_DEVICE_PFN(vkCmdSetViewport) \
102 VK_DEVICE_PFN(vkCmdUpdateBuffer) \
103 VK_DEVICE_PFN(vkCmdWaitEvents) \
104 VK_DEVICE_PFN(vkCmdWriteTimestamp) \
105 VK_DEVICE_PFN(vkCreateBuffer) \
106 VK_DEVICE_PFN(vkCreateBufferView) \
107 VK_DEVICE_PFN(vkCreateCommandPool) \
108 VK_DEVICE_PFN(vkCreateComputePipelines) \
109 VK_DEVICE_PFN(vkCreateDescriptorPool) \
110 VK_DEVICE_PFN(vkCreateDescriptorSetLayout) \
111 VK_DEVICE_PFN(vkCreateEvent) \
112 VK_DEVICE_PFN(vkCreateFence) \
113 VK_DEVICE_PFN(vkCreateFramebuffer) \
114 VK_DEVICE_PFN(vkCreateGraphicsPipelines) \
115 VK_DEVICE_PFN(vkCreateImage) \
116 VK_DEVICE_PFN(vkCreateImageView) \
117 VK_DEVICE_PFN(vkCreatePipelineCache) \
118 VK_DEVICE_PFN(vkCreatePipelineLayout) \
119 VK_DEVICE_PFN(vkCreateQueryPool) \
120 VK_DEVICE_PFN(vkCreateRenderPass) \
121 VK_DEVICE_PFN(vkCreateSampler) \
122 VK_DEVICE_PFN(vkCreateSemaphore) \
123 VK_DEVICE_PFN(vkCreateShaderModule) \
124 VK_DEVICE_PFN(vkDestroyBuffer) \
125 VK_DEVICE_PFN(vkDestroyBufferView) \
126 VK_DEVICE_PFN(vkDestroyCommandPool) \
127 VK_DEVICE_PFN(vkDestroyDescriptorPool) \
128 VK_DEVICE_PFN(vkDestroyDescriptorSetLayout) \
129 VK_DEVICE_PFN(vkDestroyDevice) \
130 VK_DEVICE_PFN(vkDestroyEvent) \
131 VK_DEVICE_PFN(vkDestroyFence) \
132 VK_DEVICE_PFN(vkDestroyFramebuffer) \
133 VK_DEVICE_PFN(vkDestroyImage) \
134 VK_DEVICE_PFN(vkDestroyImageView) \
135 VK_DEVICE_PFN(vkDestroyPipeline) \
136 VK_DEVICE_PFN(vkDestroyPipelineCache) \
137 VK_DEVICE_PFN(vkDestroyPipelineLayout) \
138 VK_DEVICE_PFN(vkDestroyQueryPool) \
139 VK_DEVICE_PFN(vkDestroyRenderPass) \
140 VK_DEVICE_PFN(vkDestroySampler) \
141 VK_DEVICE_PFN(vkDestroySemaphore) \
142 VK_DEVICE_PFN(vkDestroyShaderModule) \
143 VK_DEVICE_PFN(vkDeviceWaitIdle) \
144 VK_DEVICE_PFN(vkEndCommandBuffer) \
145 VK_DEVICE_PFN(vkFlushMappedMemoryRanges) \
146 VK_DEVICE_PFN(vkFreeCommandBuffers) \
147 VK_DEVICE_PFN(vkFreeDescriptorSets) \
148 VK_DEVICE_PFN(vkFreeMemory) \
149 VK_DEVICE_PFN(vkGetBufferMemoryRequirements) \
150 VK_DEVICE_PFN(vkGetDeviceMemoryCommitment) \
151 VK_DEVICE_PFN(vkGetDeviceQueue) \
152 VK_DEVICE_PFN(vkGetEventStatus) \
153 VK_DEVICE_PFN(vkGetFenceStatus) \
154 VK_DEVICE_PFN(vkGetImageMemoryRequirements) \
155 VK_DEVICE_PFN(vkGetImageSparseMemoryRequirements) \
156 VK_DEVICE_PFN(vkGetImageSubresourceLayout) \
157 VK_DEVICE_PFN(vkGetPipelineCacheData) \
158 VK_DEVICE_PFN(vkGetQueryPoolResults) \
159 VK_DEVICE_PFN(vkGetRenderAreaGranularity) \
160 VK_DEVICE_PFN(vkInvalidateMappedMemoryRanges) \
161 VK_DEVICE_PFN(vkMapMemory) \
162 VK_DEVICE_PFN(vkMergePipelineCaches) \
163 VK_DEVICE_PFN(vkQueueBindSparse) \
164 VK_DEVICE_PFN(vkQueueSubmit) \
165 VK_DEVICE_PFN(vkQueueWaitIdle) \
166 VK_DEVICE_PFN(vkResetCommandBuffer) \
167 VK_DEVICE_PFN(vkResetCommandPool) \
168 VK_DEVICE_PFN(vkResetDescriptorPool) \
169 VK_DEVICE_PFN(vkResetEvent) \
170 VK_DEVICE_PFN(vkResetFences) \
171 VK_DEVICE_PFN(vkSetEvent) \
172 VK_DEVICE_PFN(vkUnmapMemory) \
173 VK_DEVICE_PFN(vkUpdateDescriptorSets) \
174 VK_DEVICE_PFN(vkWaitForFences) \
175 /* VK_EXT_transform_feedback */ \
176 VK_DEVICE_EXT_PFN(vkCmdBeginQueryIndexedEXT) \
177 VK_DEVICE_EXT_PFN(vkCmdBeginTransformFeedbackEXT) \
178 VK_DEVICE_EXT_PFN(vkCmdBindTransformFeedbackBuffersEXT) \
179 VK_DEVICE_EXT_PFN(vkCmdEndQueryIndexedEXT) \
180 VK_DEVICE_EXT_PFN(vkCmdEndTransformFeedbackEXT) \
181 /* VK_KHR_swapchain */ \
182 VK_DEVICE_PFN(vkAcquireNextImageKHR) \
183 VK_DEVICE_PFN(vkCreateSwapchainKHR) \
184 VK_DEVICE_PFN(vkDestroySwapchainKHR) \
185 VK_DEVICE_PFN(vkGetSwapchainImagesKHR) \
186 VK_DEVICE_PFN(vkQueuePresentKHR)
188 #define DECLARE_VK_PFN(name) PFN_##name name;
190 struct vulkan_ops
192 #define VK_INSTANCE_PFN DECLARE_VK_PFN
193 #define VK_INSTANCE_EXT_PFN DECLARE_VK_PFN
194 #define VK_DEVICE_PFN DECLARE_VK_PFN
195 #define VK_DEVICE_EXT_PFN DECLARE_VK_PFN
196 VK_DEVICE_FUNCS()
197 VK_INSTANCE_FUNCS()
198 #undef VK_INSTANCE_PFN
199 #undef VK_INSTANCE_EXT_PFN
200 #undef VK_DEVICE_PFN
201 #undef VK_DEVICE_EXT_PFN
203 PFN_vkCreateInstance vkCreateInstance;
204 PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
207 enum wined3d_vk_extension
209 WINED3D_VK_EXT_NONE,
211 WINED3D_VK_EXT_TRANSFORM_FEEDBACK,
212 WINED3D_VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE,
214 WINED3D_VK_EXT_COUNT,
217 struct wined3d_vk_info
219 struct vulkan_ops vk_ops;
221 VkInstance instance;
222 unsigned int api_version;
224 BOOL supported[WINED3D_VK_EXT_COUNT];
225 #ifdef USE_WIN32_VULKAN
226 HMODULE vulkan_lib;
227 #endif
230 #define VK_CALL(f) (vk_info->vk_ops.f)
232 #endif /* __WINE_WINED3D_VK */