winevulkan: Implement various device functions.
[wine.git] / dlls / winevulkan / vulkan_thunks.c
blob2c63baf5e9a211b39b429e81d3bea5e4bb54d25a
1 /* Automatically generated from Vulkan vk.xml; DO NOT EDIT! */
3 #include "config.h"
4 #include "wine/port.h"
6 #include "wine/debug.h"
7 #include "wine/heap.h"
8 #include "wine/vulkan.h"
9 #include "wine/vulkan_driver.h"
10 #include "vulkan_private.h"
12 WINE_DEFAULT_DEBUG_CHANNEL(vulkan);
14 #if defined(USE_STRUCT_CONVERSION)
15 static inline void convert_VkDescriptorSetAllocateInfo_win_to_host(const VkDescriptorSetAllocateInfo *in, VkDescriptorSetAllocateInfo_host *out)
17 if (!in) return;
19 out->sType = in->sType;
20 out->pNext = in->pNext;
21 out->descriptorPool = in->descriptorPool;
22 out->descriptorSetCount = in->descriptorSetCount;
23 out->pSetLayouts = in->pSetLayouts;
26 static inline void convert_VkMemoryAllocateInfo_win_to_host(const VkMemoryAllocateInfo *in, VkMemoryAllocateInfo_host *out)
28 if (!in) return;
30 out->sType = in->sType;
31 out->pNext = in->pNext;
32 out->allocationSize = in->allocationSize;
33 out->memoryTypeIndex = in->memoryTypeIndex;
36 static inline void convert_VkBufferCreateInfo_win_to_host(const VkBufferCreateInfo *in, VkBufferCreateInfo_host *out)
38 if (!in) return;
40 out->sType = in->sType;
41 out->pNext = in->pNext;
42 out->flags = in->flags;
43 out->size = in->size;
44 out->usage = in->usage;
45 out->sharingMode = in->sharingMode;
46 out->queueFamilyIndexCount = in->queueFamilyIndexCount;
47 out->pQueueFamilyIndices = in->pQueueFamilyIndices;
50 static inline void convert_VkBufferViewCreateInfo_win_to_host(const VkBufferViewCreateInfo *in, VkBufferViewCreateInfo_host *out)
52 if (!in) return;
54 out->sType = in->sType;
55 out->pNext = in->pNext;
56 out->flags = in->flags;
57 out->buffer = in->buffer;
58 out->format = in->format;
59 out->offset = in->offset;
60 out->range = in->range;
63 static inline void convert_VkPipelineShaderStageCreateInfo_win_to_host(const VkPipelineShaderStageCreateInfo *in, VkPipelineShaderStageCreateInfo_host *out)
65 if (!in) return;
67 out->sType = in->sType;
68 out->pNext = in->pNext;
69 out->flags = in->flags;
70 out->stage = in->stage;
71 out->module = in->module;
72 out->pName = in->pName;
73 out->pSpecializationInfo = in->pSpecializationInfo;
76 static inline VkComputePipelineCreateInfo_host *convert_VkComputePipelineCreateInfo_array_win_to_host(const VkComputePipelineCreateInfo *in, uint32_t count)
78 VkComputePipelineCreateInfo_host *out;
79 unsigned int i;
81 if (!in) return NULL;
83 out = heap_alloc(count * sizeof(*out));
84 for (i = 0; i < count; i++)
86 out[i].sType = in[i].sType;
87 out[i].pNext = in[i].pNext;
88 out[i].flags = in[i].flags;
89 convert_VkPipelineShaderStageCreateInfo_win_to_host(&in[i].stage, &out[i].stage);
90 out[i].layout = in[i].layout;
91 out[i].basePipelineHandle = in[i].basePipelineHandle;
92 out[i].basePipelineIndex = in[i].basePipelineIndex;
95 return out;
98 static inline void free_VkComputePipelineCreateInfo_array(VkComputePipelineCreateInfo_host *in, uint32_t count)
100 if (!in) return;
102 heap_free(in);
105 static inline void convert_VkFramebufferCreateInfo_win_to_host(const VkFramebufferCreateInfo *in, VkFramebufferCreateInfo_host *out)
107 if (!in) return;
109 out->sType = in->sType;
110 out->pNext = in->pNext;
111 out->flags = in->flags;
112 out->renderPass = in->renderPass;
113 out->attachmentCount = in->attachmentCount;
114 out->pAttachments = in->pAttachments;
115 out->width = in->width;
116 out->height = in->height;
117 out->layers = in->layers;
120 static inline VkPipelineShaderStageCreateInfo_host *convert_VkPipelineShaderStageCreateInfo_array_win_to_host(const VkPipelineShaderStageCreateInfo *in, uint32_t count)
122 VkPipelineShaderStageCreateInfo_host *out;
123 unsigned int i;
125 if (!in) return NULL;
127 out = heap_alloc(count * sizeof(*out));
128 for (i = 0; i < count; i++)
130 out[i].sType = in[i].sType;
131 out[i].pNext = in[i].pNext;
132 out[i].flags = in[i].flags;
133 out[i].stage = in[i].stage;
134 out[i].module = in[i].module;
135 out[i].pName = in[i].pName;
136 out[i].pSpecializationInfo = in[i].pSpecializationInfo;
139 return out;
142 static inline void free_VkPipelineShaderStageCreateInfo_array(VkPipelineShaderStageCreateInfo_host *in, uint32_t count)
144 if (!in) return;
146 heap_free(in);
149 static inline VkGraphicsPipelineCreateInfo_host *convert_VkGraphicsPipelineCreateInfo_array_win_to_host(const VkGraphicsPipelineCreateInfo *in, uint32_t count)
151 VkGraphicsPipelineCreateInfo_host *out;
152 unsigned int i;
154 if (!in) return NULL;
156 out = heap_alloc(count * sizeof(*out));
157 for (i = 0; i < count; i++)
159 out[i].sType = in[i].sType;
160 out[i].pNext = in[i].pNext;
161 out[i].flags = in[i].flags;
162 out[i].stageCount = in[i].stageCount;
163 out[i].pStages = convert_VkPipelineShaderStageCreateInfo_array_win_to_host(in[i].pStages, in[i].stageCount);
164 out[i].pVertexInputState = in[i].pVertexInputState;
165 out[i].pInputAssemblyState = in[i].pInputAssemblyState;
166 out[i].pTessellationState = in[i].pTessellationState;
167 out[i].pViewportState = in[i].pViewportState;
168 out[i].pRasterizationState = in[i].pRasterizationState;
169 out[i].pMultisampleState = in[i].pMultisampleState;
170 out[i].pDepthStencilState = in[i].pDepthStencilState;
171 out[i].pColorBlendState = in[i].pColorBlendState;
172 out[i].pDynamicState = in[i].pDynamicState;
173 out[i].layout = in[i].layout;
174 out[i].renderPass = in[i].renderPass;
175 out[i].subpass = in[i].subpass;
176 out[i].basePipelineHandle = in[i].basePipelineHandle;
177 out[i].basePipelineIndex = in[i].basePipelineIndex;
180 return out;
183 static inline void free_VkGraphicsPipelineCreateInfo_array(VkGraphicsPipelineCreateInfo_host *in, uint32_t count)
185 unsigned int i;
187 if (!in) return;
189 for (i = 0; i < count; i++)
191 free_VkPipelineShaderStageCreateInfo_array((VkPipelineShaderStageCreateInfo_host *)in[i].pStages, in[i].stageCount);
193 heap_free(in);
196 static inline void convert_VkImageViewCreateInfo_win_to_host(const VkImageViewCreateInfo *in, VkImageViewCreateInfo_host *out)
198 if (!in) return;
200 out->sType = in->sType;
201 out->pNext = in->pNext;
202 out->flags = in->flags;
203 out->image = in->image;
204 out->viewType = in->viewType;
205 out->format = in->format;
206 out->components = in->components;
207 out->subresourceRange = in->subresourceRange;
210 static inline VkMappedMemoryRange_host *convert_VkMappedMemoryRange_array_win_to_host(const VkMappedMemoryRange *in, uint32_t count)
212 VkMappedMemoryRange_host *out;
213 unsigned int i;
215 if (!in) return NULL;
217 out = heap_alloc(count * sizeof(*out));
218 for (i = 0; i < count; i++)
220 out[i].sType = in[i].sType;
221 out[i].pNext = in[i].pNext;
222 out[i].memory = in[i].memory;
223 out[i].offset = in[i].offset;
224 out[i].size = in[i].size;
227 return out;
230 static inline void free_VkMappedMemoryRange_array(VkMappedMemoryRange_host *in, uint32_t count)
232 if (!in) return;
234 heap_free(in);
237 static inline void convert_VkMemoryRequirements_host_to_win(const VkMemoryRequirements_host *in, VkMemoryRequirements *out)
239 if (!in) return;
241 out->size = in->size;
242 out->alignment = in->alignment;
243 out->memoryTypeBits = in->memoryTypeBits;
246 static inline void convert_VkSubresourceLayout_host_to_win(const VkSubresourceLayout_host *in, VkSubresourceLayout *out)
248 if (!in) return;
250 out->offset = in->offset;
251 out->size = in->size;
252 out->rowPitch = in->rowPitch;
253 out->arrayPitch = in->arrayPitch;
254 out->depthPitch = in->depthPitch;
257 static inline void convert_VkImageFormatProperties_host_to_win(const VkImageFormatProperties_host *in, VkImageFormatProperties *out)
259 if (!in) return;
261 out->maxExtent = in->maxExtent;
262 out->maxMipLevels = in->maxMipLevels;
263 out->maxArrayLayers = in->maxArrayLayers;
264 out->sampleCounts = in->sampleCounts;
265 out->maxResourceSize = in->maxResourceSize;
268 static inline void convert_VkMemoryHeap_static_array_host_to_win(const VkMemoryHeap_host *in, VkMemoryHeap *out, uint32_t count)
270 unsigned int i;
272 if (!in) return;
274 for (i = 0; i < count; i++)
276 out[i].size = in[i].size;
277 out[i].flags = in[i].flags;
281 static inline void convert_VkPhysicalDeviceMemoryProperties_host_to_win(const VkPhysicalDeviceMemoryProperties_host *in, VkPhysicalDeviceMemoryProperties *out)
283 if (!in) return;
285 out->memoryTypeCount = in->memoryTypeCount;
286 memcpy(out->memoryTypes, in->memoryTypes, VK_MAX_MEMORY_TYPES * sizeof(VkMemoryType));
287 out->memoryHeapCount = in->memoryHeapCount;
288 convert_VkMemoryHeap_static_array_host_to_win(in->memoryHeaps, out->memoryHeaps, VK_MAX_MEMORY_HEAPS);
291 static inline void convert_VkPhysicalDeviceLimits_host_to_win(const VkPhysicalDeviceLimits_host *in, VkPhysicalDeviceLimits *out)
293 if (!in) return;
295 out->maxImageDimension1D = in->maxImageDimension1D;
296 out->maxImageDimension2D = in->maxImageDimension2D;
297 out->maxImageDimension3D = in->maxImageDimension3D;
298 out->maxImageDimensionCube = in->maxImageDimensionCube;
299 out->maxImageArrayLayers = in->maxImageArrayLayers;
300 out->maxTexelBufferElements = in->maxTexelBufferElements;
301 out->maxUniformBufferRange = in->maxUniformBufferRange;
302 out->maxStorageBufferRange = in->maxStorageBufferRange;
303 out->maxPushConstantsSize = in->maxPushConstantsSize;
304 out->maxMemoryAllocationCount = in->maxMemoryAllocationCount;
305 out->maxSamplerAllocationCount = in->maxSamplerAllocationCount;
306 out->bufferImageGranularity = in->bufferImageGranularity;
307 out->sparseAddressSpaceSize = in->sparseAddressSpaceSize;
308 out->maxBoundDescriptorSets = in->maxBoundDescriptorSets;
309 out->maxPerStageDescriptorSamplers = in->maxPerStageDescriptorSamplers;
310 out->maxPerStageDescriptorUniformBuffers = in->maxPerStageDescriptorUniformBuffers;
311 out->maxPerStageDescriptorStorageBuffers = in->maxPerStageDescriptorStorageBuffers;
312 out->maxPerStageDescriptorSampledImages = in->maxPerStageDescriptorSampledImages;
313 out->maxPerStageDescriptorStorageImages = in->maxPerStageDescriptorStorageImages;
314 out->maxPerStageDescriptorInputAttachments = in->maxPerStageDescriptorInputAttachments;
315 out->maxPerStageResources = in->maxPerStageResources;
316 out->maxDescriptorSetSamplers = in->maxDescriptorSetSamplers;
317 out->maxDescriptorSetUniformBuffers = in->maxDescriptorSetUniformBuffers;
318 out->maxDescriptorSetUniformBuffersDynamic = in->maxDescriptorSetUniformBuffersDynamic;
319 out->maxDescriptorSetStorageBuffers = in->maxDescriptorSetStorageBuffers;
320 out->maxDescriptorSetStorageBuffersDynamic = in->maxDescriptorSetStorageBuffersDynamic;
321 out->maxDescriptorSetSampledImages = in->maxDescriptorSetSampledImages;
322 out->maxDescriptorSetStorageImages = in->maxDescriptorSetStorageImages;
323 out->maxDescriptorSetInputAttachments = in->maxDescriptorSetInputAttachments;
324 out->maxVertexInputAttributes = in->maxVertexInputAttributes;
325 out->maxVertexInputBindings = in->maxVertexInputBindings;
326 out->maxVertexInputAttributeOffset = in->maxVertexInputAttributeOffset;
327 out->maxVertexInputBindingStride = in->maxVertexInputBindingStride;
328 out->maxVertexOutputComponents = in->maxVertexOutputComponents;
329 out->maxTessellationGenerationLevel = in->maxTessellationGenerationLevel;
330 out->maxTessellationPatchSize = in->maxTessellationPatchSize;
331 out->maxTessellationControlPerVertexInputComponents = in->maxTessellationControlPerVertexInputComponents;
332 out->maxTessellationControlPerVertexOutputComponents = in->maxTessellationControlPerVertexOutputComponents;
333 out->maxTessellationControlPerPatchOutputComponents = in->maxTessellationControlPerPatchOutputComponents;
334 out->maxTessellationControlTotalOutputComponents = in->maxTessellationControlTotalOutputComponents;
335 out->maxTessellationEvaluationInputComponents = in->maxTessellationEvaluationInputComponents;
336 out->maxTessellationEvaluationOutputComponents = in->maxTessellationEvaluationOutputComponents;
337 out->maxGeometryShaderInvocations = in->maxGeometryShaderInvocations;
338 out->maxGeometryInputComponents = in->maxGeometryInputComponents;
339 out->maxGeometryOutputComponents = in->maxGeometryOutputComponents;
340 out->maxGeometryOutputVertices = in->maxGeometryOutputVertices;
341 out->maxGeometryTotalOutputComponents = in->maxGeometryTotalOutputComponents;
342 out->maxFragmentInputComponents = in->maxFragmentInputComponents;
343 out->maxFragmentOutputAttachments = in->maxFragmentOutputAttachments;
344 out->maxFragmentDualSrcAttachments = in->maxFragmentDualSrcAttachments;
345 out->maxFragmentCombinedOutputResources = in->maxFragmentCombinedOutputResources;
346 out->maxComputeSharedMemorySize = in->maxComputeSharedMemorySize;
347 memcpy(out->maxComputeWorkGroupCount, in->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
348 out->maxComputeWorkGroupInvocations = in->maxComputeWorkGroupInvocations;
349 memcpy(out->maxComputeWorkGroupSize, in->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
350 out->subPixelPrecisionBits = in->subPixelPrecisionBits;
351 out->subTexelPrecisionBits = in->subTexelPrecisionBits;
352 out->mipmapPrecisionBits = in->mipmapPrecisionBits;
353 out->maxDrawIndexedIndexValue = in->maxDrawIndexedIndexValue;
354 out->maxDrawIndirectCount = in->maxDrawIndirectCount;
355 out->maxSamplerLodBias = in->maxSamplerLodBias;
356 out->maxSamplerAnisotropy = in->maxSamplerAnisotropy;
357 out->maxViewports = in->maxViewports;
358 memcpy(out->maxViewportDimensions, in->maxViewportDimensions, 2 * sizeof(uint32_t));
359 memcpy(out->viewportBoundsRange, in->viewportBoundsRange, 2 * sizeof(float));
360 out->viewportSubPixelBits = in->viewportSubPixelBits;
361 out->minMemoryMapAlignment = in->minMemoryMapAlignment;
362 out->minTexelBufferOffsetAlignment = in->minTexelBufferOffsetAlignment;
363 out->minUniformBufferOffsetAlignment = in->minUniformBufferOffsetAlignment;
364 out->minStorageBufferOffsetAlignment = in->minStorageBufferOffsetAlignment;
365 out->minTexelOffset = in->minTexelOffset;
366 out->maxTexelOffset = in->maxTexelOffset;
367 out->minTexelGatherOffset = in->minTexelGatherOffset;
368 out->maxTexelGatherOffset = in->maxTexelGatherOffset;
369 out->minInterpolationOffset = in->minInterpolationOffset;
370 out->maxInterpolationOffset = in->maxInterpolationOffset;
371 out->subPixelInterpolationOffsetBits = in->subPixelInterpolationOffsetBits;
372 out->maxFramebufferWidth = in->maxFramebufferWidth;
373 out->maxFramebufferHeight = in->maxFramebufferHeight;
374 out->maxFramebufferLayers = in->maxFramebufferLayers;
375 out->framebufferColorSampleCounts = in->framebufferColorSampleCounts;
376 out->framebufferDepthSampleCounts = in->framebufferDepthSampleCounts;
377 out->framebufferStencilSampleCounts = in->framebufferStencilSampleCounts;
378 out->framebufferNoAttachmentsSampleCounts = in->framebufferNoAttachmentsSampleCounts;
379 out->maxColorAttachments = in->maxColorAttachments;
380 out->sampledImageColorSampleCounts = in->sampledImageColorSampleCounts;
381 out->sampledImageIntegerSampleCounts = in->sampledImageIntegerSampleCounts;
382 out->sampledImageDepthSampleCounts = in->sampledImageDepthSampleCounts;
383 out->sampledImageStencilSampleCounts = in->sampledImageStencilSampleCounts;
384 out->storageImageSampleCounts = in->storageImageSampleCounts;
385 out->maxSampleMaskWords = in->maxSampleMaskWords;
386 out->timestampComputeAndGraphics = in->timestampComputeAndGraphics;
387 out->timestampPeriod = in->timestampPeriod;
388 out->maxClipDistances = in->maxClipDistances;
389 out->maxCullDistances = in->maxCullDistances;
390 out->maxCombinedClipAndCullDistances = in->maxCombinedClipAndCullDistances;
391 out->discreteQueuePriorities = in->discreteQueuePriorities;
392 memcpy(out->pointSizeRange, in->pointSizeRange, 2 * sizeof(float));
393 memcpy(out->lineWidthRange, in->lineWidthRange, 2 * sizeof(float));
394 out->pointSizeGranularity = in->pointSizeGranularity;
395 out->lineWidthGranularity = in->lineWidthGranularity;
396 out->strictLines = in->strictLines;
397 out->standardSampleLocations = in->standardSampleLocations;
398 out->optimalBufferCopyOffsetAlignment = in->optimalBufferCopyOffsetAlignment;
399 out->optimalBufferCopyRowPitchAlignment = in->optimalBufferCopyRowPitchAlignment;
400 out->nonCoherentAtomSize = in->nonCoherentAtomSize;
403 static inline void convert_VkPhysicalDeviceProperties_host_to_win(const VkPhysicalDeviceProperties_host *in, VkPhysicalDeviceProperties *out)
405 if (!in) return;
407 out->apiVersion = in->apiVersion;
408 out->driverVersion = in->driverVersion;
409 out->vendorID = in->vendorID;
410 out->deviceID = in->deviceID;
411 out->deviceType = in->deviceType;
412 memcpy(out->deviceName, in->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
413 memcpy(out->pipelineCacheUUID, in->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
414 convert_VkPhysicalDeviceLimits_host_to_win(&in->limits, &out->limits);
415 out->sparseProperties = in->sparseProperties;
418 static inline VkDescriptorImageInfo_host *convert_VkDescriptorImageInfo_array_win_to_host(const VkDescriptorImageInfo *in, uint32_t count)
420 VkDescriptorImageInfo_host *out;
421 unsigned int i;
423 if (!in) return NULL;
425 out = heap_alloc(count * sizeof(*out));
426 for (i = 0; i < count; i++)
428 out[i].sampler = in[i].sampler;
429 out[i].imageView = in[i].imageView;
430 out[i].imageLayout = in[i].imageLayout;
433 return out;
436 static inline void free_VkDescriptorImageInfo_array(VkDescriptorImageInfo_host *in, uint32_t count)
438 if (!in) return;
440 heap_free(in);
443 static inline VkDescriptorBufferInfo_host *convert_VkDescriptorBufferInfo_array_win_to_host(const VkDescriptorBufferInfo *in, uint32_t count)
445 VkDescriptorBufferInfo_host *out;
446 unsigned int i;
448 if (!in) return NULL;
450 out = heap_alloc(count * sizeof(*out));
451 for (i = 0; i < count; i++)
453 out[i].buffer = in[i].buffer;
454 out[i].offset = in[i].offset;
455 out[i].range = in[i].range;
458 return out;
461 static inline void free_VkDescriptorBufferInfo_array(VkDescriptorBufferInfo_host *in, uint32_t count)
463 if (!in) return;
465 heap_free(in);
468 static inline VkWriteDescriptorSet_host *convert_VkWriteDescriptorSet_array_win_to_host(const VkWriteDescriptorSet *in, uint32_t count)
470 VkWriteDescriptorSet_host *out;
471 unsigned int i;
473 if (!in) return NULL;
475 out = heap_alloc(count * sizeof(*out));
476 for (i = 0; i < count; i++)
478 out[i].sType = in[i].sType;
479 out[i].pNext = in[i].pNext;
480 out[i].dstSet = in[i].dstSet;
481 out[i].dstBinding = in[i].dstBinding;
482 out[i].dstArrayElement = in[i].dstArrayElement;
483 out[i].descriptorCount = in[i].descriptorCount;
484 out[i].descriptorType = in[i].descriptorType;
485 out[i].pImageInfo = convert_VkDescriptorImageInfo_array_win_to_host(in[i].pImageInfo, in[i].descriptorCount);
486 out[i].pBufferInfo = convert_VkDescriptorBufferInfo_array_win_to_host(in[i].pBufferInfo, in[i].descriptorCount);
487 out[i].pTexelBufferView = in[i].pTexelBufferView;
490 return out;
493 static inline void free_VkWriteDescriptorSet_array(VkWriteDescriptorSet_host *in, uint32_t count)
495 unsigned int i;
497 if (!in) return;
499 for (i = 0; i < count; i++)
501 free_VkDescriptorImageInfo_array((VkDescriptorImageInfo_host *)in[i].pImageInfo, in[i].descriptorCount);
502 free_VkDescriptorBufferInfo_array((VkDescriptorBufferInfo_host *)in[i].pBufferInfo, in[i].descriptorCount);
504 heap_free(in);
507 static inline VkCopyDescriptorSet_host *convert_VkCopyDescriptorSet_array_win_to_host(const VkCopyDescriptorSet *in, uint32_t count)
509 VkCopyDescriptorSet_host *out;
510 unsigned int i;
512 if (!in) return NULL;
514 out = heap_alloc(count * sizeof(*out));
515 for (i = 0; i < count; i++)
517 out[i].sType = in[i].sType;
518 out[i].pNext = in[i].pNext;
519 out[i].srcSet = in[i].srcSet;
520 out[i].srcBinding = in[i].srcBinding;
521 out[i].srcArrayElement = in[i].srcArrayElement;
522 out[i].dstSet = in[i].dstSet;
523 out[i].dstBinding = in[i].dstBinding;
524 out[i].dstArrayElement = in[i].dstArrayElement;
525 out[i].descriptorCount = in[i].descriptorCount;
528 return out;
531 static inline void free_VkCopyDescriptorSet_array(VkCopyDescriptorSet_host *in, uint32_t count)
533 if (!in) return;
535 heap_free(in);
538 #endif /* USE_STRUCT_CONVERSION */
540 static VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers)
542 FIXME("stub: %p, %p, %p\n", device, pAllocateInfo, pCommandBuffers);
543 return VK_ERROR_OUT_OF_HOST_MEMORY;
546 static VkResult WINAPI wine_vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, VkDescriptorSet *pDescriptorSets)
548 #if defined(USE_STRUCT_CONVERSION)
549 VkResult result;
550 VkDescriptorSetAllocateInfo_host pAllocateInfo_host;
551 TRACE("%p, %p, %p\n", device, pAllocateInfo, pDescriptorSets);
553 convert_VkDescriptorSetAllocateInfo_win_to_host(pAllocateInfo, &pAllocateInfo_host);
554 result = device->funcs.p_vkAllocateDescriptorSets(device->device, &pAllocateInfo_host, pDescriptorSets);
556 return result;
557 #else
558 TRACE("%p, %p, %p\n", device, pAllocateInfo, pDescriptorSets);
559 return device->funcs.p_vkAllocateDescriptorSets(device->device, pAllocateInfo, pDescriptorSets);
560 #endif
563 static VkResult WINAPI wine_vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory)
565 #if defined(USE_STRUCT_CONVERSION)
566 VkResult result;
567 VkMemoryAllocateInfo_host pAllocateInfo_host;
568 TRACE("%p, %p, %p, %p\n", device, pAllocateInfo, pAllocator, pMemory);
570 convert_VkMemoryAllocateInfo_win_to_host(pAllocateInfo, &pAllocateInfo_host);
571 result = device->funcs.p_vkAllocateMemory(device->device, &pAllocateInfo_host, NULL, pMemory);
573 return result;
574 #else
575 TRACE("%p, %p, %p, %p\n", device, pAllocateInfo, pAllocator, pMemory);
576 return device->funcs.p_vkAllocateMemory(device->device, pAllocateInfo, NULL, pMemory);
577 #endif
580 static VkResult WINAPI wine_vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo)
582 FIXME("stub: %p, %p\n", commandBuffer, pBeginInfo);
583 return VK_ERROR_OUT_OF_HOST_MEMORY;
586 static VkResult WINAPI wine_vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
588 TRACE("%p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
589 return device->funcs.p_vkBindBufferMemory(device->device, buffer, memory, memoryOffset);
592 static VkResult WINAPI wine_vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
594 TRACE("%p, 0x%s, 0x%s, 0x%s\n", device, wine_dbgstr_longlong(image), wine_dbgstr_longlong(memory), wine_dbgstr_longlong(memoryOffset));
595 return device->funcs.p_vkBindImageMemory(device->device, image, memory, memoryOffset);
598 static void WINAPI wine_vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
600 FIXME("stub: %p, 0x%s, %u, %#x\n", commandBuffer, wine_dbgstr_longlong(queryPool), query, flags);
603 static void WINAPI wine_vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo *pRenderPassBegin, VkSubpassContents contents)
605 FIXME("stub: %p, %p, %d\n", commandBuffer, pRenderPassBegin, contents);
608 static void WINAPI wine_vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t *pDynamicOffsets)
610 FIXME("stub: %p, %d, 0x%s, %u, %u, %p, %u, %p\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(layout), firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
613 static void WINAPI wine_vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType)
615 FIXME("stub: %p, 0x%s, 0x%s, %d\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), indexType);
618 static void WINAPI wine_vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
620 FIXME("stub: %p, %d, 0x%s\n", commandBuffer, pipelineBindPoint, wine_dbgstr_longlong(pipeline));
623 static void WINAPI wine_vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer *pBuffers, const VkDeviceSize *pOffsets)
625 FIXME("stub: %p, %u, %u, %p, %p\n", commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets);
628 static void WINAPI wine_vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit *pRegions, VkFilter filter)
630 FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p, %d\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions, filter);
633 static void WINAPI wine_vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment *pAttachments, uint32_t rectCount, const VkClearRect *pRects)
635 FIXME("stub: %p, %u, %p, %u, %p\n", commandBuffer, attachmentCount, pAttachments, rectCount, pRects);
638 static void WINAPI wine_vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
640 FIXME("stub: %p, 0x%s, %d, %p, %u, %p\n", commandBuffer, wine_dbgstr_longlong(image), imageLayout, pColor, rangeCount, pRanges);
643 static void WINAPI wine_vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue *pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
645 FIXME("stub: %p, 0x%s, %d, %p, %u, %p\n", commandBuffer, wine_dbgstr_longlong(image), imageLayout, pDepthStencil, rangeCount, pRanges);
648 static void WINAPI wine_vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy *pRegions)
650 FIXME("stub: %p, 0x%s, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcBuffer), wine_dbgstr_longlong(dstBuffer), regionCount, pRegions);
653 static void WINAPI wine_vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy *pRegions)
655 FIXME("stub: %p, 0x%s, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcBuffer), wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
658 static void WINAPI wine_vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy *pRegions)
660 FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
663 static void WINAPI wine_vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy *pRegions)
665 FIXME("stub: %p, 0x%s, %d, 0x%s, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstBuffer), regionCount, pRegions);
668 static void WINAPI wine_vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags)
670 FIXME("stub: %p, 0x%s, %u, %u, 0x%s, 0x%s, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(queryPool), firstQuery, queryCount, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(stride), flags);
673 static void WINAPI wine_vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
675 FIXME("stub: %p, %u, %u, %u\n", commandBuffer, groupCountX, groupCountY, groupCountZ);
678 static void WINAPI wine_vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset)
680 FIXME("stub: %p, 0x%s, 0x%s\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset));
683 static void WINAPI wine_vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
685 FIXME("stub: %p, %u, %u, %u, %u\n", commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
688 static void WINAPI wine_vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
690 FIXME("stub: %p, %u, %u, %u, %d, %u\n", commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
693 static void WINAPI wine_vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
695 FIXME("stub: %p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
698 static void WINAPI wine_vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
700 FIXME("stub: %p, 0x%s, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset), drawCount, stride);
703 static void WINAPI wine_vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
705 FIXME("stub: %p, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), query);
708 static void WINAPI wine_vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
710 FIXME("stub: %p\n", commandBuffer);
713 static void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
715 FIXME("stub: %p, %u, %p\n", commandBuffer, commandBufferCount, pCommandBuffers);
718 static void WINAPI wine_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
720 FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(size), data);
723 static void WINAPI wine_vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents)
725 FIXME("stub: %p, %d\n", commandBuffer, contents);
728 static void WINAPI wine_vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
730 FIXME("stub: %p, %#x, %#x, %#x, %u, %p, %u, %p, %u, %p\n", commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
733 static void WINAPI wine_vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues)
735 FIXME("stub: %p, 0x%s, %#x, %u, %u, %p\n", commandBuffer, wine_dbgstr_longlong(layout), stageFlags, offset, size, pValues);
738 static void WINAPI wine_vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
740 FIXME("stub: %p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
743 static void WINAPI wine_vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount)
745 FIXME("stub: %p, 0x%s, %u, %u\n", commandBuffer, wine_dbgstr_longlong(queryPool), firstQuery, queryCount);
748 static void WINAPI wine_vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve *pRegions)
750 FIXME("stub: %p, 0x%s, %d, 0x%s, %d, %u, %p\n", commandBuffer, wine_dbgstr_longlong(srcImage), srcImageLayout, wine_dbgstr_longlong(dstImage), dstImageLayout, regionCount, pRegions);
753 static void WINAPI wine_vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4])
755 FIXME("stub: %p, %p\n", commandBuffer, blendConstants);
758 static void WINAPI wine_vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
760 FIXME("stub: %p, %f, %f, %f\n", commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
763 static void WINAPI wine_vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
765 FIXME("stub: %p, %f, %f\n", commandBuffer, minDepthBounds, maxDepthBounds);
768 static void WINAPI wine_vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
770 FIXME("stub: %p, 0x%s, %#x\n", commandBuffer, wine_dbgstr_longlong(event), stageMask);
773 static void WINAPI wine_vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth)
775 FIXME("stub: %p, %f\n", commandBuffer, lineWidth);
778 static void WINAPI wine_vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *pScissors)
780 FIXME("stub: %p, %u, %u, %p\n", commandBuffer, firstScissor, scissorCount, pScissors);
783 static void WINAPI wine_vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask)
785 FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, compareMask);
788 static void WINAPI wine_vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
790 FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, reference);
793 static void WINAPI wine_vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask)
795 FIXME("stub: %p, %#x, %u\n", commandBuffer, faceMask, writeMask);
798 static void WINAPI wine_vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *pViewports)
800 FIXME("stub: %p, %u, %u, %p\n", commandBuffer, firstViewport, viewportCount, pViewports);
803 static void WINAPI wine_vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData)
805 FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %p\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(dataSize), pData);
808 static void WINAPI wine_vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent *pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers)
810 FIXME("stub: %p, %u, %p, %#x, %#x, %u, %p, %u, %p, %u, %p\n", commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
813 static void WINAPI wine_vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query)
815 FIXME("stub: %p, %d, 0x%s, %u\n", commandBuffer, pipelineStage, wine_dbgstr_longlong(queryPool), query);
818 static VkResult WINAPI wine_vkCreateBuffer(VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer)
820 #if defined(USE_STRUCT_CONVERSION)
821 VkResult result;
822 VkBufferCreateInfo_host pCreateInfo_host;
823 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pBuffer);
825 convert_VkBufferCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
826 result = device->funcs.p_vkCreateBuffer(device->device, &pCreateInfo_host, NULL, pBuffer);
828 return result;
829 #else
830 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pBuffer);
831 return device->funcs.p_vkCreateBuffer(device->device, pCreateInfo, NULL, pBuffer);
832 #endif
835 static VkResult WINAPI wine_vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView)
837 #if defined(USE_STRUCT_CONVERSION)
838 VkResult result;
839 VkBufferViewCreateInfo_host pCreateInfo_host;
840 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
842 convert_VkBufferViewCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
843 result = device->funcs.p_vkCreateBufferView(device->device, &pCreateInfo_host, NULL, pView);
845 return result;
846 #else
847 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
848 return device->funcs.p_vkCreateBufferView(device->device, pCreateInfo, NULL, pView);
849 #endif
852 static VkResult WINAPI wine_vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkCommandPool *pCommandPool)
854 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pCommandPool);
855 return device->funcs.p_vkCreateCommandPool(device->device, pCreateInfo, NULL, pCommandPool);
858 static VkResult WINAPI wine_vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
860 #if defined(USE_STRUCT_CONVERSION)
861 VkResult result;
862 VkComputePipelineCreateInfo_host *pCreateInfos_host;
863 TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
865 pCreateInfos_host = convert_VkComputePipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount);
866 result = device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
868 free_VkComputePipelineCreateInfo_array(pCreateInfos_host, createInfoCount);
869 return result;
870 #else
871 TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
872 return device->funcs.p_vkCreateComputePipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
873 #endif
876 static VkResult WINAPI wine_vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool)
878 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pDescriptorPool);
879 return device->funcs.p_vkCreateDescriptorPool(device->device, pCreateInfo, NULL, pDescriptorPool);
882 static VkResult WINAPI wine_vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDescriptorSetLayout *pSetLayout)
884 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSetLayout);
885 return device->funcs.p_vkCreateDescriptorSetLayout(device->device, pCreateInfo, NULL, pSetLayout);
888 static VkResult WINAPI wine_vkCreateEvent(VkDevice device, const VkEventCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkEvent *pEvent)
890 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pEvent);
891 return device->funcs.p_vkCreateEvent(device->device, pCreateInfo, NULL, pEvent);
894 static VkResult WINAPI wine_vkCreateFence(VkDevice device, const VkFenceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFence *pFence)
896 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFence);
897 return device->funcs.p_vkCreateFence(device->device, pCreateInfo, NULL, pFence);
900 static VkResult WINAPI wine_vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkFramebuffer *pFramebuffer)
902 #if defined(USE_STRUCT_CONVERSION)
903 VkResult result;
904 VkFramebufferCreateInfo_host pCreateInfo_host;
905 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFramebuffer);
907 convert_VkFramebufferCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
908 result = device->funcs.p_vkCreateFramebuffer(device->device, &pCreateInfo_host, NULL, pFramebuffer);
910 return result;
911 #else
912 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pFramebuffer);
913 return device->funcs.p_vkCreateFramebuffer(device->device, pCreateInfo, NULL, pFramebuffer);
914 #endif
917 static VkResult WINAPI wine_vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines)
919 #if defined(USE_STRUCT_CONVERSION)
920 VkResult result;
921 VkGraphicsPipelineCreateInfo_host *pCreateInfos_host;
922 TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
924 pCreateInfos_host = convert_VkGraphicsPipelineCreateInfo_array_win_to_host(pCreateInfos, createInfoCount);
925 result = device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos_host, NULL, pPipelines);
927 free_VkGraphicsPipelineCreateInfo_array(pCreateInfos_host, createInfoCount);
928 return result;
929 #else
930 TRACE("%p, 0x%s, %u, %p, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), createInfoCount, pCreateInfos, pAllocator, pPipelines);
931 return device->funcs.p_vkCreateGraphicsPipelines(device->device, pipelineCache, createInfoCount, pCreateInfos, NULL, pPipelines);
932 #endif
935 static VkResult WINAPI wine_vkCreateImage(VkDevice device, const VkImageCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImage *pImage)
937 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pImage);
938 return device->funcs.p_vkCreateImage(device->device, pCreateInfo, NULL, pImage);
941 static VkResult WINAPI wine_vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView)
943 #if defined(USE_STRUCT_CONVERSION)
944 VkResult result;
945 VkImageViewCreateInfo_host pCreateInfo_host;
946 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
948 convert_VkImageViewCreateInfo_win_to_host(pCreateInfo, &pCreateInfo_host);
949 result = device->funcs.p_vkCreateImageView(device->device, &pCreateInfo_host, NULL, pView);
951 return result;
952 #else
953 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pView);
954 return device->funcs.p_vkCreateImageView(device->device, pCreateInfo, NULL, pView);
955 #endif
958 static VkResult WINAPI wine_vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineCache *pPipelineCache)
960 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineCache);
961 return device->funcs.p_vkCreatePipelineCache(device->device, pCreateInfo, NULL, pPipelineCache);
964 static VkResult WINAPI wine_vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkPipelineLayout *pPipelineLayout)
966 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pPipelineLayout);
967 return device->funcs.p_vkCreatePipelineLayout(device->device, pCreateInfo, NULL, pPipelineLayout);
970 static VkResult WINAPI wine_vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool)
972 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pQueryPool);
973 return device->funcs.p_vkCreateQueryPool(device->device, pCreateInfo, NULL, pQueryPool);
976 static VkResult WINAPI wine_vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass)
978 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pRenderPass);
979 return device->funcs.p_vkCreateRenderPass(device->device, pCreateInfo, NULL, pRenderPass);
982 static VkResult WINAPI wine_vkCreateSampler(VkDevice device, const VkSamplerCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSampler *pSampler)
984 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSampler);
985 return device->funcs.p_vkCreateSampler(device->device, pCreateInfo, NULL, pSampler);
988 static VkResult WINAPI wine_vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSemaphore *pSemaphore)
990 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pSemaphore);
991 return device->funcs.p_vkCreateSemaphore(device->device, pCreateInfo, NULL, pSemaphore);
994 static VkResult WINAPI wine_vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule)
996 TRACE("%p, %p, %p, %p\n", device, pCreateInfo, pAllocator, pShaderModule);
997 return device->funcs.p_vkCreateShaderModule(device->device, pCreateInfo, NULL, pShaderModule);
1000 static void WINAPI wine_vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator)
1002 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pAllocator);
1003 device->funcs.p_vkDestroyBuffer(device->device, buffer, NULL);
1006 static void WINAPI wine_vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator)
1008 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(bufferView), pAllocator);
1009 device->funcs.p_vkDestroyBufferView(device->device, bufferView, NULL);
1012 static void WINAPI wine_vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator)
1014 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(commandPool), pAllocator);
1015 device->funcs.p_vkDestroyCommandPool(device->device, commandPool, NULL);
1018 static void WINAPI wine_vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator)
1020 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorPool), pAllocator);
1021 device->funcs.p_vkDestroyDescriptorPool(device->device, descriptorPool, NULL);
1024 static void WINAPI wine_vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks *pAllocator)
1026 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(descriptorSetLayout), pAllocator);
1027 device->funcs.p_vkDestroyDescriptorSetLayout(device->device, descriptorSetLayout, NULL);
1030 static void WINAPI wine_vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks *pAllocator)
1032 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(event), pAllocator);
1033 device->funcs.p_vkDestroyEvent(device->device, event, NULL);
1036 static void WINAPI wine_vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks *pAllocator)
1038 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(fence), pAllocator);
1039 device->funcs.p_vkDestroyFence(device->device, fence, NULL);
1042 static void WINAPI wine_vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks *pAllocator)
1044 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(framebuffer), pAllocator);
1045 device->funcs.p_vkDestroyFramebuffer(device->device, framebuffer, NULL);
1048 static void WINAPI wine_vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks *pAllocator)
1050 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pAllocator);
1051 device->funcs.p_vkDestroyImage(device->device, image, NULL);
1054 static void WINAPI wine_vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator)
1056 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(imageView), pAllocator);
1057 device->funcs.p_vkDestroyImageView(device->device, imageView, NULL);
1060 static void WINAPI wine_vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator)
1062 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipeline), pAllocator);
1063 device->funcs.p_vkDestroyPipeline(device->device, pipeline, NULL);
1066 static void WINAPI wine_vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks *pAllocator)
1068 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineCache), pAllocator);
1069 device->funcs.p_vkDestroyPipelineCache(device->device, pipelineCache, NULL);
1072 static void WINAPI wine_vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks *pAllocator)
1074 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(pipelineLayout), pAllocator);
1075 device->funcs.p_vkDestroyPipelineLayout(device->device, pipelineLayout, NULL);
1078 static void WINAPI wine_vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks *pAllocator)
1080 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(queryPool), pAllocator);
1081 device->funcs.p_vkDestroyQueryPool(device->device, queryPool, NULL);
1084 static void WINAPI wine_vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator)
1086 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pAllocator);
1087 device->funcs.p_vkDestroyRenderPass(device->device, renderPass, NULL);
1090 static void WINAPI wine_vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks *pAllocator)
1092 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(sampler), pAllocator);
1093 device->funcs.p_vkDestroySampler(device->device, sampler, NULL);
1096 static void WINAPI wine_vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator)
1098 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(semaphore), pAllocator);
1099 device->funcs.p_vkDestroySemaphore(device->device, semaphore, NULL);
1102 static void WINAPI wine_vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator)
1104 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(shaderModule), pAllocator);
1105 device->funcs.p_vkDestroyShaderModule(device->device, shaderModule, NULL);
1108 static VkResult WINAPI wine_vkDeviceWaitIdle(VkDevice device)
1110 TRACE("%p\n", device);
1111 return device->funcs.p_vkDeviceWaitIdle(device->device);
1114 static VkResult WINAPI wine_vkEndCommandBuffer(VkCommandBuffer commandBuffer)
1116 FIXME("stub: %p\n", commandBuffer);
1117 return VK_ERROR_OUT_OF_HOST_MEMORY;
1120 static VkResult WINAPI wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties)
1122 TRACE("%p, %p, %p\n", physicalDevice, pPropertyCount, pProperties);
1123 return physicalDevice->instance->funcs.p_vkEnumerateDeviceLayerProperties(physicalDevice->phys_dev, pPropertyCount, pProperties);
1126 static VkResult WINAPI wine_vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
1128 #if defined(USE_STRUCT_CONVERSION)
1129 VkResult result;
1130 VkMappedMemoryRange_host *pMemoryRanges_host;
1131 TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
1133 pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(pMemoryRanges, memoryRangeCount);
1134 result = device->funcs.p_vkFlushMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges_host);
1136 free_VkMappedMemoryRange_array(pMemoryRanges_host, memoryRangeCount);
1137 return result;
1138 #else
1139 TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
1140 return device->funcs.p_vkFlushMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges);
1141 #endif
1144 static void WINAPI wine_vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers)
1146 FIXME("stub: %p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(commandPool), commandBufferCount, pCommandBuffers);
1149 static VkResult WINAPI wine_vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet *pDescriptorSets)
1151 TRACE("%p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(descriptorPool), descriptorSetCount, pDescriptorSets);
1152 return device->funcs.p_vkFreeDescriptorSets(device->device, descriptorPool, descriptorSetCount, pDescriptorSets);
1155 static void WINAPI wine_vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator)
1157 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pAllocator);
1158 device->funcs.p_vkFreeMemory(device->device, memory, NULL);
1161 static void WINAPI wine_vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements)
1163 #if defined(USE_STRUCT_CONVERSION)
1164 VkMemoryRequirements_host pMemoryRequirements_host;
1165 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
1167 device->funcs.p_vkGetBufferMemoryRequirements(device->device, buffer, &pMemoryRequirements_host);
1169 convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
1170 #else
1171 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(buffer), pMemoryRequirements);
1172 device->funcs.p_vkGetBufferMemoryRequirements(device->device, buffer, pMemoryRequirements);
1173 #endif
1176 static void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize *pCommittedMemoryInBytes)
1178 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes);
1179 device->funcs.p_vkGetDeviceMemoryCommitment(device->device, memory, pCommittedMemoryInBytes);
1182 static VkResult WINAPI wine_vkGetEventStatus(VkDevice device, VkEvent event)
1184 TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
1185 return device->funcs.p_vkGetEventStatus(device->device, event);
1188 static VkResult WINAPI wine_vkGetFenceStatus(VkDevice device, VkFence fence)
1190 TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(fence));
1191 return device->funcs.p_vkGetFenceStatus(device->device, fence);
1194 static void WINAPI wine_vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements *pMemoryRequirements)
1196 #if defined(USE_STRUCT_CONVERSION)
1197 VkMemoryRequirements_host pMemoryRequirements_host;
1198 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
1200 device->funcs.p_vkGetImageMemoryRequirements(device->device, image, &pMemoryRequirements_host);
1202 convert_VkMemoryRequirements_host_to_win(&pMemoryRequirements_host, pMemoryRequirements);
1203 #else
1204 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(image), pMemoryRequirements);
1205 device->funcs.p_vkGetImageMemoryRequirements(device->device, image, pMemoryRequirements);
1206 #endif
1209 static void WINAPI wine_vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
1211 TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSparseMemoryRequirementCount, pSparseMemoryRequirements);
1212 device->funcs.p_vkGetImageSparseMemoryRequirements(device->device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
1215 static void WINAPI wine_vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout)
1217 #if defined(USE_STRUCT_CONVERSION)
1218 VkSubresourceLayout_host pLayout_host;
1219 TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSubresource, pLayout);
1221 device->funcs.p_vkGetImageSubresourceLayout(device->device, image, pSubresource, &pLayout_host);
1223 convert_VkSubresourceLayout_host_to_win(&pLayout_host, pLayout);
1224 #else
1225 TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(image), pSubresource, pLayout);
1226 device->funcs.p_vkGetImageSubresourceLayout(device->device, image, pSubresource, pLayout);
1227 #endif
1230 static void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
1232 TRACE("%p, %p\n", physicalDevice, pFeatures);
1233 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFeatures(physicalDevice->phys_dev, pFeatures);
1236 static void WINAPI wine_vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties *pFormatProperties)
1238 TRACE("%p, %d, %p\n", physicalDevice, format, pFormatProperties);
1239 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceFormatProperties(physicalDevice->phys_dev, format, pFormatProperties);
1242 static VkResult WINAPI wine_vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties *pImageFormatProperties)
1244 #if defined(USE_STRUCT_CONVERSION)
1245 VkResult result;
1246 VkImageFormatProperties_host pImageFormatProperties_host;
1247 TRACE("%p, %d, %d, %d, %#x, %#x, %p\n", physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
1249 result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(physicalDevice->phys_dev, format, type, tiling, usage, flags, &pImageFormatProperties_host);
1251 convert_VkImageFormatProperties_host_to_win(&pImageFormatProperties_host, pImageFormatProperties);
1252 return result;
1253 #else
1254 TRACE("%p, %d, %d, %d, %#x, %#x, %p\n", physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties);
1255 return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceImageFormatProperties(physicalDevice->phys_dev, format, type, tiling, usage, flags, pImageFormatProperties);
1256 #endif
1259 static void WINAPI wine_vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties)
1261 #if defined(USE_STRUCT_CONVERSION)
1262 VkPhysicalDeviceMemoryProperties_host pMemoryProperties_host;
1263 TRACE("%p, %p\n", physicalDevice, pMemoryProperties);
1265 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(physicalDevice->phys_dev, &pMemoryProperties_host);
1267 convert_VkPhysicalDeviceMemoryProperties_host_to_win(&pMemoryProperties_host, pMemoryProperties);
1268 #else
1269 TRACE("%p, %p\n", physicalDevice, pMemoryProperties);
1270 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(physicalDevice->phys_dev, pMemoryProperties);
1271 #endif
1274 static void WINAPI wine_vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties *pProperties)
1276 #if defined(USE_STRUCT_CONVERSION)
1277 VkPhysicalDeviceProperties_host pProperties_host;
1278 TRACE("%p, %p\n", physicalDevice, pProperties);
1280 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties(physicalDevice->phys_dev, &pProperties_host);
1282 convert_VkPhysicalDeviceProperties_host_to_win(&pProperties_host, pProperties);
1283 #else
1284 TRACE("%p, %p\n", physicalDevice, pProperties);
1285 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceProperties(physicalDevice->phys_dev, pProperties);
1286 #endif
1289 static void WINAPI wine_vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties)
1291 TRACE("%p, %p, %p\n", physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
1292 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice->phys_dev, pQueueFamilyPropertyCount, pQueueFamilyProperties);
1295 static void WINAPI wine_vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t *pPropertyCount, VkSparseImageFormatProperties *pProperties)
1297 TRACE("%p, %d, %d, %d, %#x, %d, %p, %p\n", physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties);
1298 physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice->phys_dev, format, type, samples, usage, tiling, pPropertyCount, pProperties);
1301 static VkResult WINAPI wine_vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t *pDataSize, void *pData)
1303 TRACE("%p, 0x%s, %p, %p\n", device, wine_dbgstr_longlong(pipelineCache), pDataSize, pData);
1304 return device->funcs.p_vkGetPipelineCacheData(device->device, pipelineCache, pDataSize, pData);
1307 static VkResult WINAPI wine_vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *pData, VkDeviceSize stride, VkQueryResultFlags flags)
1309 TRACE("%p, 0x%s, %u, %u, 0x%s, %p, 0x%s, %#x\n", device, wine_dbgstr_longlong(queryPool), firstQuery, queryCount, wine_dbgstr_longlong(dataSize), pData, wine_dbgstr_longlong(stride), flags);
1310 return device->funcs.p_vkGetQueryPoolResults(device->device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags);
1313 static void WINAPI wine_vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D *pGranularity)
1315 TRACE("%p, 0x%s, %p\n", device, wine_dbgstr_longlong(renderPass), pGranularity);
1316 device->funcs.p_vkGetRenderAreaGranularity(device->device, renderPass, pGranularity);
1319 static VkResult WINAPI wine_vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange *pMemoryRanges)
1321 #if defined(USE_STRUCT_CONVERSION)
1322 VkResult result;
1323 VkMappedMemoryRange_host *pMemoryRanges_host;
1324 TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
1326 pMemoryRanges_host = convert_VkMappedMemoryRange_array_win_to_host(pMemoryRanges, memoryRangeCount);
1327 result = device->funcs.p_vkInvalidateMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges_host);
1329 free_VkMappedMemoryRange_array(pMemoryRanges_host, memoryRangeCount);
1330 return result;
1331 #else
1332 TRACE("%p, %u, %p\n", device, memoryRangeCount, pMemoryRanges);
1333 return device->funcs.p_vkInvalidateMappedMemoryRanges(device->device, memoryRangeCount, pMemoryRanges);
1334 #endif
1337 static VkResult WINAPI wine_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData)
1339 TRACE("%p, 0x%s, 0x%s, 0x%s, %#x, %p\n", device, wine_dbgstr_longlong(memory), wine_dbgstr_longlong(offset), wine_dbgstr_longlong(size), flags, ppData);
1340 return device->funcs.p_vkMapMemory(device->device, memory, offset, size, flags, ppData);
1343 static VkResult WINAPI wine_vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache *pSrcCaches)
1345 TRACE("%p, 0x%s, %u, %p\n", device, wine_dbgstr_longlong(dstCache), srcCacheCount, pSrcCaches);
1346 return device->funcs.p_vkMergePipelineCaches(device->device, dstCache, srcCacheCount, pSrcCaches);
1349 static VkResult WINAPI wine_vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo, VkFence fence)
1351 FIXME("stub: %p, %u, %p, 0x%s\n", queue, bindInfoCount, pBindInfo, wine_dbgstr_longlong(fence));
1352 return VK_ERROR_OUT_OF_HOST_MEMORY;
1355 static VkResult WINAPI wine_vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence)
1357 FIXME("stub: %p, %u, %p, 0x%s\n", queue, submitCount, pSubmits, wine_dbgstr_longlong(fence));
1358 return VK_ERROR_OUT_OF_HOST_MEMORY;
1361 static VkResult WINAPI wine_vkQueueWaitIdle(VkQueue queue)
1363 FIXME("stub: %p\n", queue);
1364 return VK_ERROR_OUT_OF_HOST_MEMORY;
1367 static VkResult WINAPI wine_vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
1369 FIXME("stub: %p, %#x\n", commandBuffer, flags);
1370 return VK_ERROR_OUT_OF_HOST_MEMORY;
1373 static VkResult WINAPI wine_vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
1375 TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(commandPool), flags);
1376 return device->funcs.p_vkResetCommandPool(device->device, commandPool, flags);
1379 static VkResult WINAPI wine_vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags)
1381 TRACE("%p, 0x%s, %#x\n", device, wine_dbgstr_longlong(descriptorPool), flags);
1382 return device->funcs.p_vkResetDescriptorPool(device->device, descriptorPool, flags);
1385 static VkResult WINAPI wine_vkResetEvent(VkDevice device, VkEvent event)
1387 TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
1388 return device->funcs.p_vkResetEvent(device->device, event);
1391 static VkResult WINAPI wine_vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences)
1393 TRACE("%p, %u, %p\n", device, fenceCount, pFences);
1394 return device->funcs.p_vkResetFences(device->device, fenceCount, pFences);
1397 static VkResult WINAPI wine_vkSetEvent(VkDevice device, VkEvent event)
1399 TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(event));
1400 return device->funcs.p_vkSetEvent(device->device, event);
1403 static void WINAPI wine_vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
1405 TRACE("%p, 0x%s\n", device, wine_dbgstr_longlong(memory));
1406 device->funcs.p_vkUnmapMemory(device->device, memory);
1409 static void WINAPI wine_vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet *pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies)
1411 #if defined(USE_STRUCT_CONVERSION)
1412 VkWriteDescriptorSet_host *pDescriptorWrites_host;
1413 VkCopyDescriptorSet_host *pDescriptorCopies_host;
1414 TRACE("%p, %u, %p, %u, %p\n", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
1416 pDescriptorWrites_host = convert_VkWriteDescriptorSet_array_win_to_host(pDescriptorWrites, descriptorWriteCount);
1417 pDescriptorCopies_host = convert_VkCopyDescriptorSet_array_win_to_host(pDescriptorCopies, descriptorCopyCount);
1418 device->funcs.p_vkUpdateDescriptorSets(device->device, descriptorWriteCount, pDescriptorWrites_host, descriptorCopyCount, pDescriptorCopies_host);
1420 free_VkWriteDescriptorSet_array(pDescriptorWrites_host, descriptorWriteCount);
1421 free_VkCopyDescriptorSet_array(pDescriptorCopies_host, descriptorCopyCount);
1422 #else
1423 TRACE("%p, %u, %p, %u, %p\n", device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
1424 device->funcs.p_vkUpdateDescriptorSets(device->device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies);
1425 #endif
1428 static VkResult WINAPI wine_vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence *pFences, VkBool32 waitAll, uint64_t timeout)
1430 TRACE("%p, %u, %p, %u, 0x%s\n", device, fenceCount, pFences, waitAll, wine_dbgstr_longlong(timeout));
1431 return device->funcs.p_vkWaitForFences(device->device, fenceCount, pFences, waitAll, timeout);
1434 static const struct vulkan_func vk_device_dispatch_table[] =
1436 {"vkAcquireNextImageKHR", &wine_vkAcquireNextImageKHR},
1437 {"vkAllocateCommandBuffers", &wine_vkAllocateCommandBuffers},
1438 {"vkAllocateDescriptorSets", &wine_vkAllocateDescriptorSets},
1439 {"vkAllocateMemory", &wine_vkAllocateMemory},
1440 {"vkBeginCommandBuffer", &wine_vkBeginCommandBuffer},
1441 {"vkBindBufferMemory", &wine_vkBindBufferMemory},
1442 {"vkBindImageMemory", &wine_vkBindImageMemory},
1443 {"vkCmdBeginQuery", &wine_vkCmdBeginQuery},
1444 {"vkCmdBeginRenderPass", &wine_vkCmdBeginRenderPass},
1445 {"vkCmdBindDescriptorSets", &wine_vkCmdBindDescriptorSets},
1446 {"vkCmdBindIndexBuffer", &wine_vkCmdBindIndexBuffer},
1447 {"vkCmdBindPipeline", &wine_vkCmdBindPipeline},
1448 {"vkCmdBindVertexBuffers", &wine_vkCmdBindVertexBuffers},
1449 {"vkCmdBlitImage", &wine_vkCmdBlitImage},
1450 {"vkCmdClearAttachments", &wine_vkCmdClearAttachments},
1451 {"vkCmdClearColorImage", &wine_vkCmdClearColorImage},
1452 {"vkCmdClearDepthStencilImage", &wine_vkCmdClearDepthStencilImage},
1453 {"vkCmdCopyBuffer", &wine_vkCmdCopyBuffer},
1454 {"vkCmdCopyBufferToImage", &wine_vkCmdCopyBufferToImage},
1455 {"vkCmdCopyImage", &wine_vkCmdCopyImage},
1456 {"vkCmdCopyImageToBuffer", &wine_vkCmdCopyImageToBuffer},
1457 {"vkCmdCopyQueryPoolResults", &wine_vkCmdCopyQueryPoolResults},
1458 {"vkCmdDispatch", &wine_vkCmdDispatch},
1459 {"vkCmdDispatchIndirect", &wine_vkCmdDispatchIndirect},
1460 {"vkCmdDraw", &wine_vkCmdDraw},
1461 {"vkCmdDrawIndexed", &wine_vkCmdDrawIndexed},
1462 {"vkCmdDrawIndexedIndirect", &wine_vkCmdDrawIndexedIndirect},
1463 {"vkCmdDrawIndirect", &wine_vkCmdDrawIndirect},
1464 {"vkCmdEndQuery", &wine_vkCmdEndQuery},
1465 {"vkCmdEndRenderPass", &wine_vkCmdEndRenderPass},
1466 {"vkCmdExecuteCommands", &wine_vkCmdExecuteCommands},
1467 {"vkCmdFillBuffer", &wine_vkCmdFillBuffer},
1468 {"vkCmdNextSubpass", &wine_vkCmdNextSubpass},
1469 {"vkCmdPipelineBarrier", &wine_vkCmdPipelineBarrier},
1470 {"vkCmdPushConstants", &wine_vkCmdPushConstants},
1471 {"vkCmdResetEvent", &wine_vkCmdResetEvent},
1472 {"vkCmdResetQueryPool", &wine_vkCmdResetQueryPool},
1473 {"vkCmdResolveImage", &wine_vkCmdResolveImage},
1474 {"vkCmdSetBlendConstants", &wine_vkCmdSetBlendConstants},
1475 {"vkCmdSetDepthBias", &wine_vkCmdSetDepthBias},
1476 {"vkCmdSetDepthBounds", &wine_vkCmdSetDepthBounds},
1477 {"vkCmdSetEvent", &wine_vkCmdSetEvent},
1478 {"vkCmdSetLineWidth", &wine_vkCmdSetLineWidth},
1479 {"vkCmdSetScissor", &wine_vkCmdSetScissor},
1480 {"vkCmdSetStencilCompareMask", &wine_vkCmdSetStencilCompareMask},
1481 {"vkCmdSetStencilReference", &wine_vkCmdSetStencilReference},
1482 {"vkCmdSetStencilWriteMask", &wine_vkCmdSetStencilWriteMask},
1483 {"vkCmdSetViewport", &wine_vkCmdSetViewport},
1484 {"vkCmdUpdateBuffer", &wine_vkCmdUpdateBuffer},
1485 {"vkCmdWaitEvents", &wine_vkCmdWaitEvents},
1486 {"vkCmdWriteTimestamp", &wine_vkCmdWriteTimestamp},
1487 {"vkCreateBuffer", &wine_vkCreateBuffer},
1488 {"vkCreateBufferView", &wine_vkCreateBufferView},
1489 {"vkCreateCommandPool", &wine_vkCreateCommandPool},
1490 {"vkCreateComputePipelines", &wine_vkCreateComputePipelines},
1491 {"vkCreateDescriptorPool", &wine_vkCreateDescriptorPool},
1492 {"vkCreateDescriptorSetLayout", &wine_vkCreateDescriptorSetLayout},
1493 {"vkCreateEvent", &wine_vkCreateEvent},
1494 {"vkCreateFence", &wine_vkCreateFence},
1495 {"vkCreateFramebuffer", &wine_vkCreateFramebuffer},
1496 {"vkCreateGraphicsPipelines", &wine_vkCreateGraphicsPipelines},
1497 {"vkCreateImage", &wine_vkCreateImage},
1498 {"vkCreateImageView", &wine_vkCreateImageView},
1499 {"vkCreatePipelineCache", &wine_vkCreatePipelineCache},
1500 {"vkCreatePipelineLayout", &wine_vkCreatePipelineLayout},
1501 {"vkCreateQueryPool", &wine_vkCreateQueryPool},
1502 {"vkCreateRenderPass", &wine_vkCreateRenderPass},
1503 {"vkCreateSampler", &wine_vkCreateSampler},
1504 {"vkCreateSemaphore", &wine_vkCreateSemaphore},
1505 {"vkCreateShaderModule", &wine_vkCreateShaderModule},
1506 {"vkCreateSwapchainKHR", &wine_vkCreateSwapchainKHR},
1507 {"vkDestroyBuffer", &wine_vkDestroyBuffer},
1508 {"vkDestroyBufferView", &wine_vkDestroyBufferView},
1509 {"vkDestroyCommandPool", &wine_vkDestroyCommandPool},
1510 {"vkDestroyDescriptorPool", &wine_vkDestroyDescriptorPool},
1511 {"vkDestroyDescriptorSetLayout", &wine_vkDestroyDescriptorSetLayout},
1512 {"vkDestroyDevice", &wine_vkDestroyDevice},
1513 {"vkDestroyEvent", &wine_vkDestroyEvent},
1514 {"vkDestroyFence", &wine_vkDestroyFence},
1515 {"vkDestroyFramebuffer", &wine_vkDestroyFramebuffer},
1516 {"vkDestroyImage", &wine_vkDestroyImage},
1517 {"vkDestroyImageView", &wine_vkDestroyImageView},
1518 {"vkDestroyPipeline", &wine_vkDestroyPipeline},
1519 {"vkDestroyPipelineCache", &wine_vkDestroyPipelineCache},
1520 {"vkDestroyPipelineLayout", &wine_vkDestroyPipelineLayout},
1521 {"vkDestroyQueryPool", &wine_vkDestroyQueryPool},
1522 {"vkDestroyRenderPass", &wine_vkDestroyRenderPass},
1523 {"vkDestroySampler", &wine_vkDestroySampler},
1524 {"vkDestroySemaphore", &wine_vkDestroySemaphore},
1525 {"vkDestroyShaderModule", &wine_vkDestroyShaderModule},
1526 {"vkDestroySwapchainKHR", &wine_vkDestroySwapchainKHR},
1527 {"vkDeviceWaitIdle", &wine_vkDeviceWaitIdle},
1528 {"vkEndCommandBuffer", &wine_vkEndCommandBuffer},
1529 {"vkFlushMappedMemoryRanges", &wine_vkFlushMappedMemoryRanges},
1530 {"vkFreeCommandBuffers", &wine_vkFreeCommandBuffers},
1531 {"vkFreeDescriptorSets", &wine_vkFreeDescriptorSets},
1532 {"vkFreeMemory", &wine_vkFreeMemory},
1533 {"vkGetBufferMemoryRequirements", &wine_vkGetBufferMemoryRequirements},
1534 {"vkGetDeviceMemoryCommitment", &wine_vkGetDeviceMemoryCommitment},
1535 {"vkGetDeviceProcAddr", &wine_vkGetDeviceProcAddr},
1536 {"vkGetDeviceQueue", &wine_vkGetDeviceQueue},
1537 {"vkGetEventStatus", &wine_vkGetEventStatus},
1538 {"vkGetFenceStatus", &wine_vkGetFenceStatus},
1539 {"vkGetImageMemoryRequirements", &wine_vkGetImageMemoryRequirements},
1540 {"vkGetImageSparseMemoryRequirements", &wine_vkGetImageSparseMemoryRequirements},
1541 {"vkGetImageSubresourceLayout", &wine_vkGetImageSubresourceLayout},
1542 {"vkGetPipelineCacheData", &wine_vkGetPipelineCacheData},
1543 {"vkGetQueryPoolResults", &wine_vkGetQueryPoolResults},
1544 {"vkGetRenderAreaGranularity", &wine_vkGetRenderAreaGranularity},
1545 {"vkGetSwapchainImagesKHR", &wine_vkGetSwapchainImagesKHR},
1546 {"vkInvalidateMappedMemoryRanges", &wine_vkInvalidateMappedMemoryRanges},
1547 {"vkMapMemory", &wine_vkMapMemory},
1548 {"vkMergePipelineCaches", &wine_vkMergePipelineCaches},
1549 {"vkQueueBindSparse", &wine_vkQueueBindSparse},
1550 {"vkQueuePresentKHR", &wine_vkQueuePresentKHR},
1551 {"vkQueueSubmit", &wine_vkQueueSubmit},
1552 {"vkQueueWaitIdle", &wine_vkQueueWaitIdle},
1553 {"vkResetCommandBuffer", &wine_vkResetCommandBuffer},
1554 {"vkResetCommandPool", &wine_vkResetCommandPool},
1555 {"vkResetDescriptorPool", &wine_vkResetDescriptorPool},
1556 {"vkResetEvent", &wine_vkResetEvent},
1557 {"vkResetFences", &wine_vkResetFences},
1558 {"vkSetEvent", &wine_vkSetEvent},
1559 {"vkUnmapMemory", &wine_vkUnmapMemory},
1560 {"vkUpdateDescriptorSets", &wine_vkUpdateDescriptorSets},
1561 {"vkWaitForFences", &wine_vkWaitForFences},
1564 static const struct vulkan_func vk_instance_dispatch_table[] =
1566 {"vkCreateDevice", &wine_vkCreateDevice},
1567 {"vkCreateWin32SurfaceKHR", &wine_vkCreateWin32SurfaceKHR},
1568 {"vkDestroyInstance", &wine_vkDestroyInstance},
1569 {"vkDestroySurfaceKHR", &wine_vkDestroySurfaceKHR},
1570 {"vkEnumerateDeviceExtensionProperties", &wine_vkEnumerateDeviceExtensionProperties},
1571 {"vkEnumerateDeviceLayerProperties", &wine_vkEnumerateDeviceLayerProperties},
1572 {"vkEnumeratePhysicalDevices", &wine_vkEnumeratePhysicalDevices},
1573 {"vkGetPhysicalDeviceFeatures", &wine_vkGetPhysicalDeviceFeatures},
1574 {"vkGetPhysicalDeviceFormatProperties", &wine_vkGetPhysicalDeviceFormatProperties},
1575 {"vkGetPhysicalDeviceImageFormatProperties", &wine_vkGetPhysicalDeviceImageFormatProperties},
1576 {"vkGetPhysicalDeviceMemoryProperties", &wine_vkGetPhysicalDeviceMemoryProperties},
1577 {"vkGetPhysicalDeviceProperties", &wine_vkGetPhysicalDeviceProperties},
1578 {"vkGetPhysicalDeviceQueueFamilyProperties", &wine_vkGetPhysicalDeviceQueueFamilyProperties},
1579 {"vkGetPhysicalDeviceSparseImageFormatProperties", &wine_vkGetPhysicalDeviceSparseImageFormatProperties},
1580 {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", &wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR},
1581 {"vkGetPhysicalDeviceSurfaceFormatsKHR", &wine_vkGetPhysicalDeviceSurfaceFormatsKHR},
1582 {"vkGetPhysicalDeviceSurfacePresentModesKHR", &wine_vkGetPhysicalDeviceSurfacePresentModesKHR},
1583 {"vkGetPhysicalDeviceSurfaceSupportKHR", &wine_vkGetPhysicalDeviceSurfaceSupportKHR},
1584 {"vkGetPhysicalDeviceWin32PresentationSupportKHR", &wine_vkGetPhysicalDeviceWin32PresentationSupportKHR},
1587 void *wine_vk_get_device_proc_addr(const char *name)
1589 unsigned int i;
1590 for (i = 0; i < ARRAY_SIZE(vk_device_dispatch_table); i++)
1592 if (strcmp(vk_device_dispatch_table[i].name, name) == 0)
1594 TRACE("Found name=%s in device table\n", name);
1595 return vk_device_dispatch_table[i].func;
1598 return NULL;
1601 void *wine_vk_get_instance_proc_addr(const char *name)
1603 unsigned int i;
1604 for (i = 0; i < ARRAY_SIZE(vk_instance_dispatch_table); i++)
1606 if (strcmp(vk_instance_dispatch_table[i].name, name) == 0)
1608 TRACE("Found name=%s in instance table\n", name);
1609 return vk_instance_dispatch_table[i].func;
1612 return NULL;
1615 static const char * const vk_device_extensions[] =
1617 "VK_KHR_swapchain",
1620 BOOL wine_vk_device_extension_supported(const char *name)
1622 unsigned int i;
1623 for (i = 0; i < ARRAY_SIZE(vk_device_extensions); i++)
1625 if (strcmp(vk_device_extensions[i], name) == 0)
1626 return TRUE;
1628 return FALSE;