mshtml/tests: Fix a typo in ok() message.
[wine.git] / dlls / wined3d / wined3d_vk.h
blob13e07ab3db4db10c8f6613fcbfdc3b164e5227a5
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(vkGetPhysicalDeviceProperties2)
45 #define VK_DEVICE_FUNCS() \
46 VK_DEVICE_PFN(vkAllocateCommandBuffers) \
47 VK_DEVICE_PFN(vkAllocateDescriptorSets) \
48 VK_DEVICE_PFN(vkAllocateMemory) \
49 VK_DEVICE_PFN(vkBeginCommandBuffer) \
50 VK_DEVICE_PFN(vkBindBufferMemory) \
51 VK_DEVICE_PFN(vkBindImageMemory) \
52 VK_DEVICE_PFN(vkCmdBeginQuery) \
53 VK_DEVICE_PFN(vkCmdBeginRenderPass) \
54 VK_DEVICE_PFN(vkCmdBindDescriptorSets) \
55 VK_DEVICE_PFN(vkCmdBindIndexBuffer) \
56 VK_DEVICE_PFN(vkCmdBindPipeline) \
57 VK_DEVICE_PFN(vkCmdBindVertexBuffers) \
58 VK_DEVICE_PFN(vkCmdBlitImage) \
59 VK_DEVICE_PFN(vkCmdClearAttachments) \
60 VK_DEVICE_PFN(vkCmdClearColorImage) \
61 VK_DEVICE_PFN(vkCmdClearDepthStencilImage) \
62 VK_DEVICE_PFN(vkCmdCopyBuffer) \
63 VK_DEVICE_PFN(vkCmdCopyBufferToImage) \
64 VK_DEVICE_PFN(vkCmdCopyImage) \
65 VK_DEVICE_PFN(vkCmdCopyImageToBuffer) \
66 VK_DEVICE_PFN(vkCmdCopyQueryPoolResults) \
67 VK_DEVICE_PFN(vkCmdDispatch) \
68 VK_DEVICE_PFN(vkCmdDispatchIndirect) \
69 VK_DEVICE_PFN(vkCmdDraw) \
70 VK_DEVICE_PFN(vkCmdDrawIndexed) \
71 VK_DEVICE_PFN(vkCmdDrawIndexedIndirect) \
72 VK_DEVICE_PFN(vkCmdDrawIndirect) \
73 VK_DEVICE_PFN(vkCmdEndQuery) \
74 VK_DEVICE_PFN(vkCmdEndRenderPass) \
75 VK_DEVICE_PFN(vkCmdExecuteCommands) \
76 VK_DEVICE_PFN(vkCmdFillBuffer) \
77 VK_DEVICE_PFN(vkCmdNextSubpass) \
78 VK_DEVICE_PFN(vkCmdPipelineBarrier) \
79 VK_DEVICE_PFN(vkCmdPushConstants) \
80 VK_DEVICE_PFN(vkCmdResetEvent) \
81 VK_DEVICE_PFN(vkCmdResetQueryPool) \
82 VK_DEVICE_PFN(vkCmdResolveImage) \
83 VK_DEVICE_PFN(vkCmdSetBlendConstants) \
84 VK_DEVICE_PFN(vkCmdSetDepthBias) \
85 VK_DEVICE_PFN(vkCmdSetDepthBounds) \
86 VK_DEVICE_PFN(vkCmdSetEvent) \
87 VK_DEVICE_PFN(vkCmdSetLineWidth) \
88 VK_DEVICE_PFN(vkCmdSetScissor) \
89 VK_DEVICE_PFN(vkCmdSetStencilCompareMask) \
90 VK_DEVICE_PFN(vkCmdSetStencilReference) \
91 VK_DEVICE_PFN(vkCmdSetStencilWriteMask) \
92 VK_DEVICE_PFN(vkCmdSetViewport) \
93 VK_DEVICE_PFN(vkCmdUpdateBuffer) \
94 VK_DEVICE_PFN(vkCmdWaitEvents) \
95 VK_DEVICE_PFN(vkCmdWriteTimestamp) \
96 VK_DEVICE_PFN(vkCreateBuffer) \
97 VK_DEVICE_PFN(vkCreateBufferView) \
98 VK_DEVICE_PFN(vkCreateCommandPool) \
99 VK_DEVICE_PFN(vkCreateComputePipelines) \
100 VK_DEVICE_PFN(vkCreateDescriptorPool) \
101 VK_DEVICE_PFN(vkCreateDescriptorSetLayout) \
102 VK_DEVICE_PFN(vkCreateEvent) \
103 VK_DEVICE_PFN(vkCreateFence) \
104 VK_DEVICE_PFN(vkCreateFramebuffer) \
105 VK_DEVICE_PFN(vkCreateGraphicsPipelines) \
106 VK_DEVICE_PFN(vkCreateImage) \
107 VK_DEVICE_PFN(vkCreateImageView) \
108 VK_DEVICE_PFN(vkCreatePipelineCache) \
109 VK_DEVICE_PFN(vkCreatePipelineLayout) \
110 VK_DEVICE_PFN(vkCreateQueryPool) \
111 VK_DEVICE_PFN(vkCreateRenderPass) \
112 VK_DEVICE_PFN(vkCreateSampler) \
113 VK_DEVICE_PFN(vkCreateSemaphore) \
114 VK_DEVICE_PFN(vkCreateShaderModule) \
115 VK_DEVICE_PFN(vkDestroyBuffer) \
116 VK_DEVICE_PFN(vkDestroyBufferView) \
117 VK_DEVICE_PFN(vkDestroyCommandPool) \
118 VK_DEVICE_PFN(vkDestroyDescriptorPool) \
119 VK_DEVICE_PFN(vkDestroyDescriptorSetLayout) \
120 VK_DEVICE_PFN(vkDestroyDevice) \
121 VK_DEVICE_PFN(vkDestroyEvent) \
122 VK_DEVICE_PFN(vkDestroyFence) \
123 VK_DEVICE_PFN(vkDestroyFramebuffer) \
124 VK_DEVICE_PFN(vkDestroyImage) \
125 VK_DEVICE_PFN(vkDestroyImageView) \
126 VK_DEVICE_PFN(vkDestroyPipeline) \
127 VK_DEVICE_PFN(vkDestroyPipelineCache) \
128 VK_DEVICE_PFN(vkDestroyPipelineLayout) \
129 VK_DEVICE_PFN(vkDestroyQueryPool) \
130 VK_DEVICE_PFN(vkDestroyRenderPass) \
131 VK_DEVICE_PFN(vkDestroySampler) \
132 VK_DEVICE_PFN(vkDestroySemaphore) \
133 VK_DEVICE_PFN(vkDestroyShaderModule) \
134 VK_DEVICE_PFN(vkDeviceWaitIdle) \
135 VK_DEVICE_PFN(vkEndCommandBuffer) \
136 VK_DEVICE_PFN(vkFlushMappedMemoryRanges) \
137 VK_DEVICE_PFN(vkFreeCommandBuffers) \
138 VK_DEVICE_PFN(vkFreeDescriptorSets) \
139 VK_DEVICE_PFN(vkFreeMemory) \
140 VK_DEVICE_PFN(vkGetBufferMemoryRequirements) \
141 VK_DEVICE_PFN(vkGetDeviceMemoryCommitment) \
142 VK_DEVICE_PFN(vkGetDeviceQueue) \
143 VK_DEVICE_PFN(vkGetEventStatus) \
144 VK_DEVICE_PFN(vkGetFenceStatus) \
145 VK_DEVICE_PFN(vkGetImageMemoryRequirements) \
146 VK_DEVICE_PFN(vkGetImageSparseMemoryRequirements) \
147 VK_DEVICE_PFN(vkGetImageSubresourceLayout) \
148 VK_DEVICE_PFN(vkGetPipelineCacheData) \
149 VK_DEVICE_PFN(vkGetQueryPoolResults) \
150 VK_DEVICE_PFN(vkGetRenderAreaGranularity) \
151 VK_DEVICE_PFN(vkInvalidateMappedMemoryRanges) \
152 VK_DEVICE_PFN(vkMapMemory) \
153 VK_DEVICE_PFN(vkMergePipelineCaches) \
154 VK_DEVICE_PFN(vkQueueBindSparse) \
155 VK_DEVICE_PFN(vkQueueSubmit) \
156 VK_DEVICE_PFN(vkQueueWaitIdle) \
157 VK_DEVICE_PFN(vkResetCommandBuffer) \
158 VK_DEVICE_PFN(vkResetCommandPool) \
159 VK_DEVICE_PFN(vkResetDescriptorPool) \
160 VK_DEVICE_PFN(vkResetEvent) \
161 VK_DEVICE_PFN(vkResetFences) \
162 VK_DEVICE_PFN(vkSetEvent) \
163 VK_DEVICE_PFN(vkUnmapMemory) \
164 VK_DEVICE_PFN(vkUpdateDescriptorSets) \
165 VK_DEVICE_PFN(vkWaitForFences)
167 #define DECLARE_VK_PFN(name) PFN_##name name;
169 struct vulkan_ops
171 #define VK_INSTANCE_PFN DECLARE_VK_PFN
172 #define VK_INSTANCE_EXT_PFN DECLARE_VK_PFN
173 #define VK_DEVICE_PFN DECLARE_VK_PFN
174 VK_DEVICE_FUNCS()
175 VK_INSTANCE_FUNCS()
176 #undef VK_INSTANCE_PFN
177 #undef VK_INSTANCE_EXT_PFN
178 #undef VK_DEVICE_PFN
180 PFN_vkCreateInstance vkCreateInstance;
181 PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
184 struct wined3d_vk_info
186 struct vulkan_ops vk_ops;
188 VkInstance instance;
189 unsigned int api_version;
191 #ifdef USE_WIN32_VULKAN
192 HMODULE vulkan_lib;
193 #endif
196 #define VK_CALL(f) (vk_info->vk_ops.f)
198 #endif /* __WINE_WINED3D_VK */