OSDN Git Service

Fixes for extension enumeration
[android-x86/external-swiftshader.git] / src / Vulkan / libVulkan.cpp
1 // Copyright 2018 The SwiftShader Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #include "VkConfig.h"
16 #include "VkCommandBuffer.hpp"
17 #include "VkDebug.hpp"
18 #include "VkDestroy.h"
19 #include "VkDevice.hpp"
20 #include "VkEvent.hpp"
21 #include "VkFence.hpp"
22 #include "VkGetProcAddress.h"
23 #include "VkInstance.hpp"
24 #include "VkPhysicalDevice.hpp"
25 #include "VkQueue.hpp"
26 #include "VkSemaphore.hpp"
27 #include <cstring>
28 #include <string>
29
30 extern "C"
31 {
32 VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName)
33 {
34         return vk::GetProcAddr(pName);
35 }
36
37 VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance)
38 {
39         TRACE("(const VkInstanceCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkInstance* pInstance = 0x%X)",
40                         pCreateInfo, pAllocator, pInstance);
41
42         if(pCreateInfo->enabledLayerCount)
43         {
44                 UNIMPLEMENTED();
45         }
46
47         if(pCreateInfo->enabledExtensionCount)
48         {
49                 UNIMPLEMENTED();
50         }
51
52         if(pCreateInfo->pNext)
53         {
54                 switch(*reinterpret_cast<const VkStructureType*>(pCreateInfo->pNext))
55                 {
56                 case VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO:
57                         // According to the Vulkan spec, section 2.7.2. Implicit Valid Usage:
58                         // "The values VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO and
59                         //  VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO are reserved for
60                         //  internal use by the loader, and do not have corresponding
61                         //  Vulkan structures in this Specification."
62                         break;
63                 default:
64                         UNIMPLEMENTED();
65                 }
66         }
67
68         *pInstance = VK_NULL_HANDLE;
69         VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
70
71         VkResult result = vk::DispatchablePhysicalDevice::Create(pAllocator, pCreateInfo, &physicalDevice);
72         if(result != VK_SUCCESS)
73         {
74                 return result;
75         }
76
77         vk::Instance::CreateInfo info =
78         {
79                 pCreateInfo,
80                 physicalDevice
81         };
82
83         result = vk::DispatchableInstance::Create(pAllocator, &info, pInstance);
84         if(result != VK_SUCCESS)
85         {
86                 vk::destroy(physicalDevice, pAllocator);
87                 return result;
88         }
89
90         return result;
91 }
92
93 VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator)
94 {
95         TRACE("(VkInstance instance = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)", instance, pAllocator);
96
97         vk::destroy(instance, pAllocator);
98 }
99
100 VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices)
101 {
102         TRACE("(VkInstance instance = 0x%X, uint32_t* pPhysicalDeviceCount = 0x%X, VkPhysicalDevice* pPhysicalDevices = 0x%X)",
103                     instance, pPhysicalDeviceCount, pPhysicalDevices);
104
105         if(!pPhysicalDevices)
106         {
107                 *pPhysicalDeviceCount = vk::Cast(instance)->getPhysicalDeviceCount();
108         }
109         else
110         {
111                 vk::Cast(instance)->getPhysicalDevices(*pPhysicalDeviceCount, pPhysicalDevices);
112         }
113
114         return VK_SUCCESS;
115 }
116
117 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures)
118 {
119         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceFeatures* pFeatures = 0x%X)",
120                         physicalDevice, pFeatures);
121
122         *pFeatures = vk::Cast(physicalDevice)->getFeatures();
123 }
124
125 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties)
126 {
127         TRACE("GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice = 0x%X, VkFormat format = %d, VkFormatProperties* pFormatProperties = 0x%X)",
128                         physicalDevice, (int)format, pFormatProperties);
129
130         vk::Cast(physicalDevice)->getFormatProperties(format, pFormatProperties);
131 }
132
133 VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties)
134 {
135         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkFormat format = %d, VkImageType type = %d, VkImageTiling tiling = %d, VkImageUsageFlags usage = %d, VkImageCreateFlags flags = %d, VkImageFormatProperties* pImageFormatProperties = 0x%X)",
136                         physicalDevice, (int)format, (int)type, (int)tiling, usage, flags, pImageFormatProperties);
137
138         vk::Cast(physicalDevice)->getImageFormatProperties(format, type, tiling, usage, flags, pImageFormatProperties);
139
140         return VK_SUCCESS;
141 }
142
143 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties)
144 {
145         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceProperties* pProperties = 0x%X)",
146                     physicalDevice, pProperties);
147
148         *pProperties = vk::Cast(physicalDevice)->getProperties();
149 }
150
151 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties)
152 {
153         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, uint32_t* pQueueFamilyPropertyCount = 0x%X, VkQueueFamilyProperties* pQueueFamilyProperties = 0x%X))", physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
154
155         if(!pQueueFamilyProperties)
156         {
157                 *pQueueFamilyPropertyCount = vk::Cast(physicalDevice)->getQueueFamilyPropertyCount();
158         }
159         else
160         {
161                 vk::Cast(physicalDevice)->getQueueFamilyProperties(*pQueueFamilyPropertyCount, pQueueFamilyProperties);
162         }
163 }
164
165 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties)
166 {
167         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceMemoryProperties* pMemoryProperties = 0x%X)", physicalDevice, pMemoryProperties);
168
169         *pMemoryProperties = vk::Cast(physicalDevice)->getMemoryProperties();
170 }
171
172 VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char* pName)
173 {
174         TRACE("(VkInstance instance = 0x%X, const char* pName = 0x%X)", instance, pName);
175         return vk::GetProcAddr(pName);
176 }
177
178 VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName)
179 {
180         TRACE("(VkDevice device = 0x%X, const char* pName = 0x%X)", device, pName);
181         return vk::GetProcAddr(pName);
182 }
183
184 VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice)
185 {
186         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkDeviceCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkDevice* pDevice = 0x%X)",
187                 physicalDevice, pCreateInfo, pAllocator, pDevice);
188
189         if(pCreateInfo->enabledLayerCount || pCreateInfo->enabledExtensionCount)
190         {
191                 UNIMPLEMENTED();
192         }
193
194         if(pCreateInfo->pNext)
195         {
196                 switch(*reinterpret_cast<const VkStructureType*>(pCreateInfo->pNext))
197                 {
198                 case VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO:
199                         // According to the Vulkan spec, section 2.7.2. Implicit Valid Usage:
200                         // "The values VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO and
201                         //  VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO are reserved for
202                         //  internal use by the loader, and do not have corresponding
203                         //  Vulkan structures in this Specification."
204                         break;
205                 default:
206                         UNIMPLEMENTED();
207                 }
208         }
209
210         ASSERT(pCreateInfo->queueCreateInfoCount > 0);
211
212         if(pCreateInfo->pEnabledFeatures &&
213            !vk::Cast(physicalDevice)->hasFeatures(*(pCreateInfo->pEnabledFeatures)))
214         {
215                 return VK_ERROR_FEATURE_NOT_PRESENT;
216         }
217
218         uint32_t queueFamilyPropertyCount = vk::Cast(physicalDevice)->getQueueFamilyPropertyCount();
219
220         for(uint32_t i = 0; i < pCreateInfo->queueCreateInfoCount; i++)
221         {
222                 const VkDeviceQueueCreateInfo& queueCreateInfo = pCreateInfo->pQueueCreateInfos[i];
223                 if(queueCreateInfo.pNext || queueCreateInfo.flags)
224                 {
225                         UNIMPLEMENTED();
226                 }
227
228                 ASSERT(queueCreateInfo.queueFamilyIndex < queueFamilyPropertyCount);
229                 (void)queueFamilyPropertyCount; // Slence unused variable warning
230         }
231
232         vk::Device::CreateInfo deviceCreateInfo =
233         {
234                 pCreateInfo,
235                 physicalDevice
236         };
237
238         return vk::DispatchableDevice::Create(pAllocator, &deviceCreateInfo, pDevice);
239 }
240
241 VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator)
242 {
243         TRACE("(VkDevice device = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)", device, pAllocator);
244
245         vk::destroy(device, pAllocator);
246 }
247
248 VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
249 {
250         TRACE("(const char* pLayerName = 0x%X, uint32_t* pPropertyCount = 0x%X, VkExtensionProperties* pProperties = 0x%X)",
251               pLayerName, pPropertyCount, pProperties);
252
253         static VkExtensionProperties extensionProperties[] =
254         {
255                 { VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME, VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION },
256                 { VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME, VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION },
257                 { VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION },
258                 { VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION },
259                 { VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION },
260         };
261
262         uint32_t extensionPropertiesCount = sizeof(extensionProperties) / sizeof(extensionProperties[0]);
263
264         if(!pProperties)
265         {
266                 *pPropertyCount = extensionPropertiesCount;
267                 return VK_SUCCESS;
268         }
269
270         for(uint32_t i = 0; i < std::min(*pPropertyCount, extensionPropertiesCount); i++)
271         {
272                 pProperties[i] = extensionProperties[i];
273         }
274
275         return (*pPropertyCount < extensionPropertiesCount) ? VK_INCOMPLETE : VK_SUCCESS;
276 }
277
278 VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
279 {
280         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const char* pLayerName, uint32_t* pPropertyCount = 0x%X, VkExtensionProperties* pProperties = 0x%X)", physicalDevice, pPropertyCount, pProperties);
281
282         static VkExtensionProperties extensionProperties[] =
283         {
284                 { VK_KHR_16BIT_STORAGE_EXTENSION_NAME, VK_KHR_16BIT_STORAGE_SPEC_VERSION },
285                 { VK_KHR_BIND_MEMORY_2_EXTENSION_NAME, VK_KHR_BIND_MEMORY_2_SPEC_VERSION },
286                 { VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME, VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION },
287                 { VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME, VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION },
288                 { VK_KHR_DEVICE_GROUP_EXTENSION_NAME,  VK_KHR_DEVICE_GROUP_SPEC_VERSION },
289                 { VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME, VK_KHR_EXTERNAL_FENCE_SPEC_VERSION },
290                 { VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION },
291                 { VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION },
292                 { VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION },
293                 { VK_KHR_MAINTENANCE1_EXTENSION_NAME, VK_KHR_MAINTENANCE1_SPEC_VERSION },
294                 { VK_KHR_MAINTENANCE2_EXTENSION_NAME, VK_KHR_MAINTENANCE2_SPEC_VERSION },
295                 { VK_KHR_MAINTENANCE3_EXTENSION_NAME, VK_KHR_MAINTENANCE3_SPEC_VERSION },
296                 { VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_SPEC_VERSION },
297                 { VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME, VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION },
298                 { VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME, VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION },
299                 { VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION },
300                 { VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME, VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION },
301                 { VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME, VK_KHR_VARIABLE_POINTERS_SPEC_VERSION },
302         };
303
304         uint32_t extensionPropertiesCount = sizeof(extensionProperties) / sizeof(extensionProperties[0]);
305
306         if(!pProperties)
307         {
308                 *pPropertyCount = extensionPropertiesCount;
309                 return VK_SUCCESS;
310         }
311
312         for(uint32_t i = 0; i < std::min(*pPropertyCount, extensionPropertiesCount); i++)
313         {
314                 pProperties[i] = extensionProperties[i];
315         }
316
317         return (*pPropertyCount < extensionPropertiesCount) ? VK_INCOMPLETE : VK_SUCCESS;
318 }
319
320 VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties)
321 {
322         TRACE("(uint32_t* pPropertyCount = 0x%X, VkLayerProperties* pProperties = 0x%X)", pPropertyCount, pProperties);
323
324         if(!pProperties)
325         {
326                 *pPropertyCount = 0;
327                 return VK_SUCCESS;
328         }
329
330         return VK_SUCCESS;
331 }
332
333 VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties)
334 {
335         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, uint32_t* pPropertyCount = 0x%X, VkLayerProperties* pProperties = 0x%X)", physicalDevice, pPropertyCount, pProperties);
336
337         if(!pProperties)
338         {
339                 *pPropertyCount = 0;
340                 return VK_SUCCESS;
341         }
342
343         return VK_SUCCESS;
344 }
345
346 VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue)
347 {
348         TRACE("(VkDevice device = 0x%X, uint32_t queueFamilyIndex = %d, uint32_t queueIndex = %d, VkQueue* pQueue = 0x%X)",
349                     device, queueFamilyIndex, queueIndex, pQueue);
350
351         *pQueue = vk::Cast(device)->getQueue(queueFamilyIndex, queueIndex);
352 }
353
354 VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence)
355 {
356         TRACE("()");
357         UNIMPLEMENTED();
358         return VK_SUCCESS;
359 }
360
361 VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(VkQueue queue)
362 {
363         TRACE("()");
364         UNIMPLEMENTED();
365         return VK_SUCCESS;
366 }
367
368 VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(VkDevice device)
369 {
370         TRACE("()");
371         UNIMPLEMENTED();
372         return VK_SUCCESS;
373 }
374
375 VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory)
376 {
377         TRACE("(VkDevice device = 0x%X, const VkMemoryAllocateInfo* pAllocateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkDeviceMemory* pMemory = 0x%X)",
378                     device, pAllocateInfo, pAllocator, pMemory);
379
380         UNIMPLEMENTED();
381
382         return VK_SUCCESS;
383 }
384
385 VKAPI_ATTR void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator)
386 {
387         TRACE("(VkDevice device = 0x%X, VkDeviceMemory memory = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
388                     device, memory, pAllocator);
389
390         UNIMPLEMENTED();
391 }
392
393 VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData)
394 {
395         TRACE("(VkDevice device = 0x%X, VkDeviceMemory memory = 0x%X, VkDeviceSize offset = %d, VkDeviceSize size = %d, VkMemoryMapFlags flags = 0x%X, void** ppData = 0x%X)",
396                     device, memory, offset, size, flags, ppData);
397
398         UNIMPLEMENTED();
399
400         return VK_SUCCESS;
401 }
402
403 VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory)
404 {
405         TRACE("(VkDevice device = 0x%X, VkDeviceMemory memory = 0x%X)", device, memory);
406
407         UNIMPLEMENTED();
408 }
409
410 VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges)
411 {
412         TRACE("(VkDevice device = 0x%X, uint32_t memoryRangeCount = %d, const VkMappedMemoryRange* pMemoryRanges = 0x%X)",
413                     device, memoryRangeCount, pMemoryRanges);
414
415         UNIMPLEMENTED();
416
417         return VK_SUCCESS;
418 }
419
420 VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges)
421 {
422         TRACE("(VkDevice device = 0x%X, uint32_t memoryRangeCount = %d, const VkMappedMemoryRange* pMemoryRanges = 0x%X)",
423                     device, memoryRangeCount, pMemoryRanges);
424
425         UNIMPLEMENTED();
426
427         return VK_SUCCESS;
428 }
429
430 VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes)
431 {
432         TRACE("()");
433         UNIMPLEMENTED();
434 }
435
436 VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset)
437 {
438         TRACE("(VkDevice device = 0x%X, VkBuffer buffer = 0x%X, VkDeviceMemory memory = 0x%X, VkDeviceSize memoryOffset = %d)",
439                     device, buffer, memory, memoryOffset);
440
441         UNIMPLEMENTED();
442
443         return VK_SUCCESS;
444 }
445
446 VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset)
447 {
448         TRACE("(VkDevice device = 0x%X, VkImage image = 0x%X, VkDeviceMemory memory = 0x%X, VkDeviceSize memoryOffset = %d)",
449                     device, image, memory, memoryOffset);
450
451         UNIMPLEMENTED();
452
453         return VK_SUCCESS;
454 }
455
456 VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements)
457 {
458         TRACE("(VkDevice device = 0x%X, VkBuffer buffer = 0x%X, VkMemoryRequirements* pMemoryRequirements = 0x%X)",
459                     device, buffer, pMemoryRequirements);
460
461         UNIMPLEMENTED();
462 }
463
464 VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements)
465 {
466         TRACE("(VkDevice device = 0x%X, VkImage image = 0x%X, VkMemoryRequirements* pMemoryRequirements = 0x%X)",
467                     device, image, pMemoryRequirements);
468
469         UNIMPLEMENTED();
470 }
471
472 VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
473 {
474         TRACE("(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements)",
475               device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
476
477         vk::Cast(device)->getImageSparseMemoryRequirements(image, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
478 }
479
480 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties)
481 {
482         TRACE("()");
483         UNIMPLEMENTED();
484 }
485
486 VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence)
487 {
488         TRACE("()");
489         UNIMPLEMENTED();
490         return VK_SUCCESS;
491 }
492
493 VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence)
494 {
495         TRACE("(VkDevice device = 0x%X, const VkFenceCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkFence* pFence = 0x%X)",
496                     device, pCreateInfo, pAllocator, pFence);
497
498         if(pCreateInfo->pNext)
499         {
500                 UNIMPLEMENTED();
501         }
502
503         return vk::Fence::Create(pAllocator, pCreateInfo, pFence);
504 }
505
506 VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator)
507 {
508         TRACE("(VkDevice device = 0x%X, VkFence fence = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
509                     device, fence, pAllocator);
510
511
512         vk::destroy(fence, pAllocator);
513 }
514
515 VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences)
516 {
517         TRACE("(VkDevice device = 0x%X, uint32_t fenceCount = %d, const VkFence* pFences = 0x%X)",
518               device, fenceCount, pFences);
519
520         for(uint32_t i = 0; i < fenceCount; i++)
521         {
522                 vk::Cast(pFences[i])->reset();
523         }
524
525         return VK_SUCCESS;
526 }
527
528 VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence)
529 {
530         TRACE("(VkDevice device = 0x%X, VkFence fence = 0x%X)", device, fence);
531
532         return vk::Cast(fence)->getStatus();
533 }
534
535 VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout)
536 {
537         TRACE("()");
538         UNIMPLEMENTED();
539         return VK_SUCCESS;
540 }
541
542 VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore)
543 {
544         TRACE("(VkDevice device = 0x%X, const VkSemaphoreCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkSemaphore* pSemaphore = 0x%X)",
545               device, pCreateInfo, pAllocator, pSemaphore);
546
547         if(pCreateInfo->pNext || pCreateInfo->flags)
548         {
549                 UNIMPLEMENTED();
550         }
551
552         return vk::Semaphore::Create(pAllocator, pCreateInfo, pSemaphore);
553 }
554
555 VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator)
556 {
557         TRACE("(VkDevice device = 0x%X, VkSemaphore semaphore = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
558               device, semaphore, pAllocator);
559
560         vk::destroy(semaphore, pAllocator);
561 }
562
563 VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent)
564 {
565         TRACE("(VkDevice device = 0x%X, const VkEventCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkEvent* pEvent = 0x%X)",
566               device, pCreateInfo, pAllocator, pEvent);
567
568         if(pCreateInfo->pNext || pCreateInfo->flags)
569         {
570                 UNIMPLEMENTED();
571         }
572
573         return vk::Event::Create(pAllocator, pCreateInfo, pEvent);
574 }
575
576 VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator)
577 {
578         TRACE("(VkDevice device = 0x%X, VkEvent event = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
579               device, event, pAllocator);
580
581         vk::destroy(event, pAllocator);
582 }
583
584 VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(VkDevice device, VkEvent event)
585 {
586         TRACE("(VkDevice device = 0x%X, VkEvent event = 0x%X)", device, event);
587
588         return vk::Cast(event)->getStatus();
589 }
590
591 VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event)
592 {
593         TRACE("(VkDevice device = 0x%X, VkEvent event = 0x%X)", device, event);
594
595         vk::Cast(event)->signal();
596
597         return VK_SUCCESS;
598 }
599
600 VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event)
601 {
602         TRACE("(VkDevice device = 0x%X, VkEvent event = 0x%X)", device, event);
603
604         vk::Cast(event)->reset();
605
606         return VK_SUCCESS;
607 }
608
609 VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool)
610 {
611         TRACE("()");
612         UNIMPLEMENTED();
613         return VK_SUCCESS;
614 }
615
616 VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator)
617 {
618         TRACE("()");
619         UNIMPLEMENTED();
620 }
621
622 VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags)
623 {
624         TRACE("()");
625         UNIMPLEMENTED();
626         return VK_SUCCESS;
627 }
628
629 VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer)
630 {
631         TRACE("(VkDevice device = 0x%X, const VkBufferCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkBuffer* pBuffer = 0x%X)",
632                     device, pCreateInfo, pAllocator, pBuffer);
633
634         UNIMPLEMENTED();
635
636         return VK_SUCCESS;
637 }
638
639 VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator)
640 {
641         TRACE("(VkDevice device = 0x%X, VkBuffer buffer = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
642                     device, buffer, pAllocator);
643
644         UNIMPLEMENTED();
645 }
646
647 VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView)
648 {
649         TRACE("()");
650         UNIMPLEMENTED();
651         return VK_SUCCESS;
652 }
653
654 VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator)
655 {
656         TRACE("()");
657         UNIMPLEMENTED();
658 }
659
660 VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
661 {
662         TRACE("(VkDevice device = 0x%X, const VkImageCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkImage* pImage = 0x%X)",
663                     device, pCreateInfo, pAllocator, pImage);
664
665         UNIMPLEMENTED();
666
667         return VK_SUCCESS;
668 }
669
670 VKAPI_ATTR void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator)
671 {
672         TRACE("(VkDevice device = 0x%X, VkImage image = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
673                     device, image, pAllocator);
674
675         UNIMPLEMENTED();
676 }
677
678 VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout)
679 {
680         TRACE("()");
681         UNIMPLEMENTED();
682 }
683
684 VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView)
685 {
686         TRACE("(VkDevice device = 0x%X, const VkImageViewCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkImageView* pView = 0x%X)",
687                     device, pCreateInfo, pAllocator, pView);
688
689         UNIMPLEMENTED();
690
691         return VK_SUCCESS;
692 }
693
694 VKAPI_ATTR void VKAPI_CALL vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator)
695 {
696         TRACE("()");
697         UNIMPLEMENTED();
698 }
699
700 VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule)
701 {
702         TRACE("(VkDevice device = 0x%X, const VkShaderModuleCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkShaderModule* pShaderModule = 0x%X)",
703                     device, pCreateInfo, pAllocator, pShaderModule);
704
705         UNIMPLEMENTED();
706
707         return VK_SUCCESS;
708 }
709
710 VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator)
711 {
712         TRACE("(VkDevice device = 0x%X, VkShaderModule shaderModule = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
713                     device, shaderModule, pAllocator);
714
715         UNIMPLEMENTED();
716 }
717
718 VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache)
719 {
720         TRACE("()");
721         UNIMPLEMENTED();
722         return VK_SUCCESS;
723 }
724
725 VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator)
726 {
727         TRACE("()");
728         UNIMPLEMENTED();
729 }
730
731 VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData)
732 {
733         TRACE("()");
734         UNIMPLEMENTED();
735         return VK_SUCCESS;
736 }
737
738 VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches)
739 {
740         TRACE("()");
741         UNIMPLEMENTED();
742         return VK_SUCCESS;
743 }
744
745 VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
746 {
747         TRACE("(VkDevice device = 0x%X, VkPipelineCache pipelineCache = 0x%X, uint32_t createInfoCount = %d, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator = 0x%X, VkPipeline* pPipelines = 0x%X)",
748                     device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
749
750         UNIMPLEMENTED();
751
752         return VK_SUCCESS;
753 }
754
755 VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines)
756 {
757         TRACE("(VkDevice device = 0x%X, VkPipelineCache pipelineCache = 0x%X, uint32_t createInfoCount = %d, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator = 0x%X, VkPipeline* pPipelines = 0x%X)",
758                 device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines);
759
760         UNIMPLEMENTED();
761
762         return VK_SUCCESS;
763 }
764
765 VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator)
766 {
767         TRACE("(VkDevice device = 0x%X, VkPipeline pipeline = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
768                     device, pipeline, pAllocator);
769
770         UNIMPLEMENTED();
771 }
772
773 VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout)
774 {
775         TRACE("(VkDevice device = 0x%X, const VkPipelineLayoutCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkPipelineLayout* pPipelineLayout = 0x%X)",
776                     device, pCreateInfo, pAllocator, pPipelineLayout);
777
778         UNIMPLEMENTED();
779
780         return VK_SUCCESS;
781 }
782
783 VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator)
784 {
785         TRACE("(VkDevice device = 0x%X, VkPipelineLayout pipelineLayout = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
786                     device, pipelineLayout, pAllocator);
787
788         UNIMPLEMENTED();
789 }
790
791 VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler)
792 {
793         TRACE("(VkDevice device = 0x%X, const VkSamplerCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkSampler* pSampler = 0x%X)",
794                     device, pCreateInfo, pAllocator, pSampler);
795
796         UNIMPLEMENTED();
797
798         return VK_SUCCESS;
799 }
800
801 VKAPI_ATTR void VKAPI_CALL vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator)
802 {
803         TRACE("(VkDevice device = 0x%X, VkSampler sampler = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
804                     device, sampler, pAllocator);
805
806         UNIMPLEMENTED();
807 }
808
809 VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout)
810 {
811         TRACE("()");
812         UNIMPLEMENTED();
813         return VK_SUCCESS;
814 }
815
816 VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator)
817 {
818         TRACE("()");
819         UNIMPLEMENTED();
820 }
821
822 VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool)
823 {
824         TRACE("()");
825         UNIMPLEMENTED();
826         return VK_SUCCESS;
827 }
828
829 VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator)
830 {
831         TRACE("()");
832         UNIMPLEMENTED();
833 }
834
835 VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags)
836 {
837         TRACE("()");
838         UNIMPLEMENTED();
839         return VK_SUCCESS;
840 }
841
842 VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets)
843 {
844         TRACE("()");
845         UNIMPLEMENTED();
846         return VK_SUCCESS;
847 }
848
849 VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets)
850 {
851         TRACE("()");
852         UNIMPLEMENTED();
853         return VK_SUCCESS;
854 }
855
856 VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies)
857 {
858         TRACE("()");
859         UNIMPLEMENTED();
860 }
861
862 VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer)
863 {
864         TRACE("(VkDevice device = 0x%X, const VkFramebufferCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkFramebuffer* pFramebuffer = 0x%X)",
865                     device, pCreateInfo, pAllocator, pFramebuffer);
866
867         UNIMPLEMENTED();
868
869         return VK_SUCCESS;
870 }
871
872 VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator)
873 {
874         TRACE("(VkDevice device = 0x%X, VkFramebuffer framebuffer = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)");
875
876         UNIMPLEMENTED();
877 }
878
879 VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass)
880 {
881         TRACE("(VkDevice device = 0x%X, const VkRenderPassCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkRenderPass* pRenderPass = 0x%X)",
882                     device, pCreateInfo, pAllocator, pRenderPass);
883
884         UNIMPLEMENTED();
885
886         return VK_SUCCESS;
887 }
888
889 VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator)
890 {
891         TRACE("(VkDevice device = 0x%X, VkRenderPass renderPass = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
892                     device, renderPass, pAllocator);
893
894         UNIMPLEMENTED();
895 }
896
897 VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity)
898 {
899         TRACE("()");
900         UNIMPLEMENTED();
901 }
902
903 VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool)
904 {
905         TRACE("(VkDevice device = 0x%X, const VkCommandPoolCreateInfo* pCreateInfo = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X, VkCommandPool* pCommandPool = 0x%X)",
906                     device, pCreateInfo, pAllocator, pCommandPool);
907
908         UNIMPLEMENTED();
909
910         return VK_SUCCESS;
911 }
912
913 VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator)
914 {
915         TRACE("(VkDevice device = 0x%X, VkCommandPool commandPool = 0x%X, const VkAllocationCallbacks* pAllocator = 0x%X)",
916                     device, commandPool, pAllocator);
917
918         UNIMPLEMENTED();
919 }
920
921 VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
922 {
923         TRACE("()");
924         UNIMPLEMENTED();
925         return VK_SUCCESS;
926 }
927
928 VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers)
929 {
930         TRACE("(VkDevice device = 0x%X, const VkCommandBufferAllocateInfo* pAllocateInfo = 0x%X, VkCommandBuffer* pCommandBuffers = 0x%X)",
931                     device, pAllocateInfo, pCommandBuffers);
932
933         UNIMPLEMENTED();
934
935         return VK_SUCCESS;
936 }
937
938 VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers)
939 {
940         TRACE("(VkDevice device = 0x%X, VkCommandPool commandPool = 0x%X, uint32_t commandBufferCount = %d, const VkCommandBuffer* pCommandBuffers = 0x%X)",
941                     device, commandPool, commandBufferCount, pCommandBuffers);
942
943         UNIMPLEMENTED();
944 }
945
946 VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo)
947 {
948         TRACE("(VkCommandBuffer commandBuffer = 0x%X, const VkCommandBufferBeginInfo* pBeginInfo = 0x%X)",
949                     commandBuffer, pBeginInfo);
950
951         if(pBeginInfo->pNext)
952         {
953                 UNIMPLEMENTED();
954         }
955
956         return vk::Cast(commandBuffer)->begin(pBeginInfo->flags, pBeginInfo->pInheritanceInfo);
957 }
958
959 VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer)
960 {
961         TRACE("(VkCommandBuffer commandBuffer = 0x%X)", commandBuffer);
962
963         return vk::Cast(commandBuffer)->end();
964 }
965
966 VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
967 {
968         TRACE("VkCommandBuffer commandBuffer = 0x%X, VkCommandBufferResetFlags flags = %d", commandBuffer, flags);
969
970         return vk::Cast(commandBuffer)->reset(flags);
971 }
972
973 VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline)
974 {
975         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkPipelineBindPoint pipelineBindPoint = %d, VkPipeline pipeline = 0x%X)",
976                     commandBuffer, pipelineBindPoint, pipeline);
977
978         vk::Cast(commandBuffer)->bindPipeline(pipelineBindPoint, pipeline);
979 }
980
981 VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports)
982 {
983         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t firstViewport = %d, uint32_t viewportCount = %d, const VkViewport* pViewports = 0x%X)",
984               commandBuffer, firstViewport, viewportCount, pViewports);
985
986         vk::Cast(commandBuffer)->setViewport(firstViewport, viewportCount, pViewports);
987 }
988
989 VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors)
990 {
991         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t firstScissor = %d, uint32_t scissorCount = %d, const VkRect2D* pScissors = 0x%X)",
992               commandBuffer, firstScissor, scissorCount, pScissors);
993
994         vk::Cast(commandBuffer)->setScissor(firstScissor, scissorCount, pScissors);
995 }
996
997 VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth)
998 {
999         TRACE("(VkCommandBuffer commandBuffer = 0x%X, float lineWidth = %f)", commandBuffer, lineWidth);
1000
1001         vk::Cast(commandBuffer)->setLineWidth(lineWidth);
1002 }
1003
1004 VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
1005 {
1006         TRACE("(VkCommandBuffer commandBuffer = 0x%X, float depthBiasConstantFactor = %f, float depthBiasClamp = %f, float depthBiasSlopeFactor = %f)",
1007               commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
1008
1009         vk::Cast(commandBuffer)->setDepthBias(depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
1010 }
1011
1012 VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4])
1013 {
1014         TRACE("(VkCommandBuffer commandBuffer = 0x%X, const float blendConstants[4] = {%f, %f, %f, %f})",
1015               commandBuffer, blendConstants[0], blendConstants[1], blendConstants[2], blendConstants[3]);
1016
1017         vk::Cast(commandBuffer)->setBlendConstants(blendConstants);
1018 }
1019
1020 VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
1021 {
1022         TRACE("(VkCommandBuffer commandBuffer = 0x%X, float minDepthBounds = %f, float maxDepthBounds = %f)",
1023               commandBuffer, minDepthBounds, maxDepthBounds);
1024
1025         vk::Cast(commandBuffer)->setDepthBounds(minDepthBounds, maxDepthBounds);
1026 }
1027
1028 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask)
1029 {
1030         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkStencilFaceFlags faceMask = %d, uint32_t compareMask = %d)",
1031               commandBuffer, faceMask, compareMask);
1032
1033         vk::Cast(commandBuffer)->setStencilCompareMask(faceMask, compareMask);
1034 }
1035
1036 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask)
1037 {
1038         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkStencilFaceFlags faceMask = %d, uint32_t writeMask = %d)",
1039               commandBuffer, faceMask, writeMask);
1040
1041         vk::Cast(commandBuffer)->setStencilWriteMask(faceMask, writeMask);
1042 }
1043
1044 VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference)
1045 {
1046         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkStencilFaceFlags faceMask = %d, uint32_t reference = %d)",
1047               commandBuffer, faceMask, reference);
1048
1049         vk::Cast(commandBuffer)->setStencilReference(faceMask, reference);
1050 }
1051
1052 VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets)
1053 {
1054         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkPipelineBindPoint pipelineBindPoint = %d, VkPipelineLayout layout = 0x%X, uint32_t firstSet = %d, uint32_t descriptorSetCount = %d, const VkDescriptorSet* pDescriptorSets = 0x%X, uint32_t dynamicOffsetCount = %d, const uint32_t* pDynamicOffsets = 0x%X)",
1055               commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
1056
1057         vk::Cast(commandBuffer)->bindDescriptorSets(pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets);
1058 }
1059
1060 VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType)
1061 {
1062         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer buffer = 0x%X, VkDeviceSize offset = %d, VkIndexType indexType = %d)",
1063               commandBuffer, buffer, offset, indexType);
1064
1065         vk::Cast(commandBuffer)->bindIndexBuffer(buffer, offset, indexType);
1066 }
1067
1068 VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets)
1069 {
1070         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t firstBinding = %d, uint32_t bindingCount = %d, const VkBuffer* pBuffers = 0x%X, const VkDeviceSize* pOffsets = 0x%X)",
1071                     commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets);
1072
1073         vk::Cast(commandBuffer)->bindVertexBuffers(firstBinding, bindingCount, pBuffers, pOffsets);
1074 }
1075
1076 VKAPI_ATTR void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
1077 {
1078         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t vertexCount = %d, uint32_t instanceCount = %d, uint32_t firstVertex = %d, uint32_t firstInstance = %d)",
1079                     commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance);
1080
1081         vk::Cast(commandBuffer)->draw(vertexCount, instanceCount, firstVertex, firstInstance);
1082 }
1083
1084 VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
1085 {
1086         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t indexCount = %d, uint32_t instanceCount = %d, uint32_t firstIndex = %d, int32_t vertexOffset = %d, uint32_t firstInstance = %d)",
1087                     commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
1088
1089         vk::Cast(commandBuffer)->drawIndexed(indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
1090 }
1091
1092 VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
1093 {
1094         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer buffer = 0x%X, VkDeviceSize offset = %d, uint32_t drawCount = %d, uint32_t stride = %d)",
1095                     commandBuffer, buffer, offset, drawCount, stride);
1096
1097         vk::Cast(commandBuffer)->drawIndirect(buffer, offset, drawCount, stride);
1098 }
1099
1100 VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
1101 {
1102         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer buffer = 0x%X, VkDeviceSize offset = %d, uint32_t drawCount = %d, uint32_t stride = %d)",
1103                     commandBuffer, buffer, offset, drawCount, stride);
1104
1105         vk::Cast(commandBuffer)->drawIndexedIndirect(buffer, offset, drawCount, stride);
1106 }
1107
1108 VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
1109 {
1110         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t groupCountX = %d, uint32_t groupCountY = %d, uint32_t groupCountZ = %d)",
1111               commandBuffer, groupCountX, groupCountY, groupCountZ);
1112
1113         vk::Cast(commandBuffer)->dispatch(groupCountX, groupCountY, groupCountZ);
1114 }
1115
1116 VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset)
1117 {
1118         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer buffer = 0x%X, VkDeviceSize offset = %d)",
1119               commandBuffer, buffer, offset);
1120
1121         vk::Cast(commandBuffer)->dispatchIndirect(buffer, offset);
1122 }
1123
1124 VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions)
1125 {
1126         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer srcBuffer = 0x%X, VkBuffer dstBuffer = 0x%X, uint32_t regionCount = %d, const VkBufferCopy* pRegions = 0x%X)",
1127               commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions);
1128
1129         vk::Cast(commandBuffer)->copyBuffer(srcBuffer, dstBuffer, regionCount, pRegions);
1130 }
1131
1132 VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions)
1133 {
1134         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage srcImage = 0x%X, VkImageLayout srcImageLayout = %d, VkImage dstImage = 0x%X, VkImageLayout dstImageLayout = %d, uint32_t regionCount = %d, const VkImageCopy* pRegions = 0x%X)",
1135               commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
1136
1137         vk::Cast(commandBuffer)->copyImage(srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
1138 }
1139
1140 VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter)
1141 {
1142         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage srcImage = 0x%X, VkImageLayout srcImageLayout = %d, VkImage dstImage = 0x%X, VkImageLayout dstImageLayout = %d, uint32_t regionCount = %d, const VkImageBlit* pRegions = 0x%X, VkFilter filter = %d)",
1143               commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter);
1144
1145         vk::Cast(commandBuffer)->blitImage(srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter);
1146 }
1147
1148 VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions)
1149 {
1150         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer srcBuffer = 0x%X, VkImage dstImage = 0x%X, VkImageLayout dstImageLayout = %d, uint32_t regionCount = %d, const VkBufferImageCopy* pRegions = 0x%X)",
1151               commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions);
1152
1153         vk::Cast(commandBuffer)->copyBufferToImage(srcBuffer, dstImage, dstImageLayout, regionCount, pRegions);
1154 }
1155
1156 VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions)
1157 {
1158         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage srcImage = 0x%X, VkImageLayout srcImageLayout = %d, VkBuffer dstBuffer = 0x%X, uint32_t regionCount = %d, const VkBufferImageCopy* pRegions = 0x%X)",
1159                     commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions);
1160
1161         vk::Cast(commandBuffer)->copyImageToBuffer(srcImage, srcImageLayout, dstBuffer, regionCount, pRegions);
1162 }
1163
1164 VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData)
1165 {
1166         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer dstBuffer = 0x%X, VkDeviceSize dstOffset = %d, VkDeviceSize dataSize = %d, const void* pData = 0x%X)",
1167               commandBuffer, dstBuffer, dstOffset, dataSize, pData);
1168
1169         vk::Cast(commandBuffer)->updateBuffer(dstBuffer, dstOffset, dataSize, pData);
1170 }
1171
1172 VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
1173 {
1174         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkBuffer dstBuffer = 0x%X, VkDeviceSize dstOffset = %d, VkDeviceSize size = %d, uint32_t data = %d)",
1175               commandBuffer, dstBuffer, dstOffset, size, data);
1176
1177         vk::Cast(commandBuffer)->fillBuffer(dstBuffer, dstOffset, size, data);
1178 }
1179
1180 VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges)
1181 {
1182         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage image = 0x%X, VkImageLayout imageLayout = %d, const VkClearColorValue* pColor = 0x%X, uint32_t rangeCount = %d, const VkImageSubresourceRange* pRanges = 0x%X)",
1183               commandBuffer, image, imageLayout, pColor, rangeCount, pRanges);
1184
1185         vk::Cast(commandBuffer)->clearColorImage(image, imageLayout, pColor, rangeCount, pRanges);
1186 }
1187
1188 VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges)
1189 {
1190         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage image = 0x%X, VkImageLayout imageLayout = %d, const VkClearDepthStencilValue* pDepthStencil = 0x%X, uint32_t rangeCount = %d, const VkImageSubresourceRange* pRanges = 0x%X)",
1191               commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges);
1192
1193         vk::Cast(commandBuffer)->clearDepthStencilImage(image, imageLayout, pDepthStencil, rangeCount, pRanges);
1194 }
1195
1196 VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects)
1197 {
1198         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t attachmentCount = %d, const VkClearAttachment* pAttachments = 0x%X, uint32_t rectCount = %d, const VkClearRect* pRects = 0x%X)",
1199               commandBuffer, attachmentCount, pAttachments, rectCount,  pRects);
1200
1201         vk::Cast(commandBuffer)->clearAttachments(attachmentCount, pAttachments, rectCount, pRects);
1202 }
1203
1204 VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions)
1205 {
1206         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkImage srcImage = 0x%X, VkImageLayout srcImageLayout = %d, VkImage dstImage = 0x%X, VkImageLayout dstImageLayout = %d, uint32_t regionCount = %d, const VkImageResolve* pRegions = 0x%X)",
1207               commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
1208
1209         vk::Cast(commandBuffer)->resolveImage(srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions);
1210 }
1211
1212 VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
1213 {
1214         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkEvent event = 0x%X, VkPipelineStageFlags stageMask = %d)",
1215               commandBuffer, event, stageMask);
1216
1217         vk::Cast(commandBuffer)->setEvent(event, stageMask);
1218 }
1219
1220 VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask)
1221 {
1222         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkEvent event = 0x%X, VkPipelineStageFlags stageMask = %d)",
1223               commandBuffer, event, stageMask);
1224
1225         vk::Cast(commandBuffer)->resetEvent(event, stageMask);
1226 }
1227
1228 VKAPI_ATTR void VKAPI_CALL 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)
1229 {
1230         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t eventCount = %d, const VkEvent* pEvents = 0x%X, VkPipelineStageFlags srcStageMask = %d, VkPipelineStageFlags dstStageMask = %d, uint32_t memoryBarrierCount = %d, const VkMemoryBarrier* pMemoryBarriers = 0x%X, uint32_t bufferMemoryBarrierCount = %d, const VkBufferMemoryBarrier* pBufferMemoryBarriers = 0x%X, uint32_t imageMemoryBarrierCount = %d, const VkImageMemoryBarrier* pImageMemoryBarriers = 0x%X)",
1231               commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
1232
1233         vk::Cast(commandBuffer)->waitEvents(eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
1234 }
1235
1236 VKAPI_ATTR void VKAPI_CALL 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)
1237 {
1238         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkPipelineStageFlags srcStageMask = 0x%X, VkPipelineStageFlags dstStageMask = 0x%X, VkDependencyFlags dependencyFlags = %d, uint32_t memoryBarrierCount = %d, onst VkMemoryBarrier* pMemoryBarriers = 0x%X,"
1239                     " uint32_t bufferMemoryBarrierCount = %d, const VkBufferMemoryBarrier* pBufferMemoryBarriers = 0x%X, uint32_t imageMemoryBarrierCount = %d, const VkImageMemoryBarrier* pImageMemoryBarriers = 0x%X)",
1240                     commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers);
1241
1242         vk::Cast(commandBuffer)->pipelineBarrier(srcStageMask, dstStageMask, dependencyFlags,
1243                                                  memoryBarrierCount, pMemoryBarriers,
1244                                                  bufferMemoryBarrierCount, pBufferMemoryBarriers,
1245                                                  imageMemoryBarrierCount, pImageMemoryBarriers);
1246 }
1247
1248 VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags)
1249 {
1250         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkQueryPool queryPool = 0x%X, uint32_t query = %d, VkQueryControlFlags flags = %d)",
1251               commandBuffer, queryPool, query, flags);
1252
1253         vk::Cast(commandBuffer)->beginQuery(queryPool, query, flags);
1254 }
1255
1256 VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query)
1257 {
1258         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkQueryPool queryPool = 0x%X, uint32_t query = %d)",
1259               commandBuffer, queryPool, query);
1260
1261         vk::Cast(commandBuffer)->endQuery(queryPool, query);
1262 }
1263
1264 VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount)
1265 {
1266         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkQueryPool queryPool = 0x%X, uint32_t firstQuery = %d, uint32_t queryCount = %d)",
1267               commandBuffer, queryPool, firstQuery, queryCount);
1268
1269         vk::Cast(commandBuffer)->resetQueryPool(queryPool, firstQuery, queryCount);
1270 }
1271
1272 VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query)
1273 {
1274         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkPipelineStageFlagBits pipelineStage = %d, VkQueryPool queryPool = 0x%X, uint32_t query = %d)",
1275               commandBuffer, pipelineStage, queryPool, query);
1276
1277         vk::Cast(commandBuffer)->writeTimestamp(pipelineStage, queryPool, query);
1278 }
1279
1280 VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags)
1281 {
1282         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkQueryPool queryPool = 0x%X, uint32_t firstQuery = %d, uint32_t queryCount = %d, VkBuffer dstBuffer = 0x%X, VkDeviceSize dstOffset = %d, VkDeviceSize stride = %d, VkQueryResultFlags flags = %d)",
1283               commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags);
1284
1285         vk::Cast(commandBuffer)->copyQueryPoolResults(queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags);
1286 }
1287
1288 VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues)
1289 {
1290         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkPipelineLayout layout = 0x%X, VkShaderStageFlags stageFlags = %d, uint32_t offset = %d, uint32_t size = %d, const void* pValues = 0x%X)",
1291               commandBuffer, layout, stageFlags, offset, size, pValues);
1292
1293         vk::Cast(commandBuffer)->pushConstants(layout, stageFlags, offset, size, pValues);
1294 }
1295
1296 VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents)
1297 {
1298         TRACE("(VkCommandBuffer commandBuffer = 0x%X, const VkRenderPassBeginInfo* pRenderPassBegin = 0x%X, VkSubpassContents contents = %d)",
1299                     commandBuffer, pRenderPassBegin, contents);
1300
1301         if(pRenderPassBegin->pNext)
1302         {
1303                 UNIMPLEMENTED();
1304         }
1305
1306         vk::Cast(commandBuffer)->beginRenderPass(pRenderPassBegin->renderPass, pRenderPassBegin->framebuffer,
1307                                                  pRenderPassBegin->renderArea, pRenderPassBegin->clearValueCount,
1308                                                  pRenderPassBegin->pClearValues, contents);
1309 }
1310
1311 VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents)
1312 {
1313         TRACE("(VkCommandBuffer commandBuffer = 0x%X, VkSubpassContents contents = %d)",
1314               commandBuffer, contents);
1315
1316         vk::Cast(commandBuffer)->nextSubpass(contents);
1317 }
1318
1319 VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
1320 {
1321         TRACE("(VkCommandBuffer commandBuffer = 0x%X)", commandBuffer);
1322
1323         vk::Cast(commandBuffer)->endRenderPass();
1324 }
1325
1326 VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers)
1327 {
1328         TRACE("(VkCommandBuffer commandBuffer = 0x%X, uint32_t commandBufferCount = %d, const VkCommandBuffer* pCommandBuffers = 0x%X)",
1329               commandBuffer, commandBufferCount, pCommandBuffers);
1330
1331         vk::Cast(commandBuffer)->executeCommands(commandBufferCount, pCommandBuffers);
1332 }
1333
1334 VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion(uint32_t* pApiVersion)
1335 {
1336         TRACE("(uint32_t* pApiVersion = 0x%X)", pApiVersion);
1337         *pApiVersion = VK_API_VERSION_1_1;
1338         return VK_SUCCESS;
1339 }
1340
1341 VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos)
1342 {
1343         TRACE("()");
1344         UNIMPLEMENTED();
1345         return VK_SUCCESS;
1346 }
1347
1348 VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos)
1349 {
1350         TRACE("()");
1351         UNIMPLEMENTED();
1352         return VK_SUCCESS;
1353 }
1354
1355 VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures)
1356 {
1357         TRACE("(VkDevice device = 0x%X, uint32_t heapIndex = %d, uint32_t localDeviceIndex = %d, uint32_t remoteDeviceIndex = %d, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures = 0x%X)",
1358               device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
1359
1360         vk::Cast(device)->getGroupPeerMemoryFeatures(heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures);
1361 }
1362
1363 VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask)
1364 {
1365         TRACE("()");
1366         UNIMPLEMENTED();
1367 }
1368
1369 VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ)
1370 {
1371         TRACE("()");
1372         UNIMPLEMENTED();
1373 }
1374
1375 VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties)
1376 {
1377         TRACE("VkInstance instance = 0x%X, uint32_t* pPhysicalDeviceGroupCount = 0x%X, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties = 0x%X",
1378               instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties);
1379
1380         if(!pPhysicalDeviceGroupProperties)
1381         {
1382                 *pPhysicalDeviceGroupCount = vk::Cast(instance)->getPhysicalDeviceGroupCount();
1383         }
1384         else
1385         {
1386                 vk::Cast(instance)->getPhysicalDeviceGroups(*pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties);
1387         }
1388
1389         return VK_SUCCESS;
1390 }
1391
1392 VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1393 {
1394         TRACE("(VkDevice device = 0x%X, const VkImageMemoryRequirementsInfo2* pInfo = 0x%X, VkMemoryRequirements2* pMemoryRequirements = 0x%X)",
1395               device, pInfo, pMemoryRequirements);
1396
1397         if(pInfo->pNext || pMemoryRequirements->pNext)
1398         {
1399                 UNIMPLEMENTED();
1400         }
1401
1402         vkGetImageMemoryRequirements(device, pInfo->image, &(pMemoryRequirements->memoryRequirements));
1403 }
1404
1405 VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements)
1406 {
1407         TRACE("(VkDevice device = 0x%X, const VkBufferMemoryRequirementsInfo2* pInfo = 0x%X, VkMemoryRequirements2* pMemoryRequirements = 0x%X)",
1408               device, pInfo, pMemoryRequirements);
1409
1410         if(pInfo->pNext || pMemoryRequirements->pNext)
1411         {
1412                 UNIMPLEMENTED();
1413         }
1414
1415         vkGetBufferMemoryRequirements(device, pInfo->buffer, &(pMemoryRequirements->memoryRequirements));
1416 }
1417
1418 VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
1419 {
1420         TRACE("(VkDevice device = 0x%X, const VkImageSparseMemoryRequirementsInfo2* pInfo = 0x%X, uint32_t* pSparseMemoryRequirementCount = 0x%X, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements = 0x%X)",
1421               device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements);
1422
1423         if(pInfo->pNext || pSparseMemoryRequirements->pNext)
1424         {
1425                 UNIMPLEMENTED();
1426         }
1427
1428         vkGetImageSparseMemoryRequirements(device, pInfo->image, pSparseMemoryRequirementCount, &(pSparseMemoryRequirements->memoryRequirements));
1429 }
1430
1431 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures)
1432 {
1433         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceFeatures2* pFeatures = 0x%X)", physicalDevice, pFeatures);
1434
1435         void* pNext = pFeatures->pNext;
1436         while(pNext)
1437         {
1438                 switch(*reinterpret_cast<const VkStructureType*>(pNext))
1439                 {
1440                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
1441                         {
1442                                 auto& features = *reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(pNext);
1443                                 vk::Cast(physicalDevice)->getFeatures(&features);
1444                                 pNext = features.pNext;
1445                         }
1446                         break;
1447                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES:
1448                         {
1449                                 auto& features = *reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(pNext);
1450                                 vk::Cast(physicalDevice)->getFeatures(&features);
1451                                 pNext = features.pNext;
1452                         }
1453                         break;
1454                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES:
1455                         {
1456                                 auto& features = *reinterpret_cast<VkPhysicalDeviceVariablePointerFeatures*>(pNext);
1457                                 vk::Cast(physicalDevice)->getFeatures(&features);
1458                                 pNext = features.pNext;
1459                         }
1460                         break;
1461                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR:
1462                         {
1463                                 auto& features = *reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(pNext);
1464                                 vk::Cast(physicalDevice)->getFeatures(&features);
1465                                 pNext = features.pNext;
1466                         }
1467                         break;
1468                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
1469                         {
1470                                 auto& features = *reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(pNext);
1471                                 vk::Cast(physicalDevice)->getFeatures(&features);
1472                                 pNext = features.pNext;
1473                         }
1474                         break;
1475                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
1476                         {
1477                                 auto& features = *reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(pNext);
1478                                 vk::Cast(physicalDevice)->getFeatures(&features);
1479                                 pNext = features.pNext;
1480                         }
1481                         break;
1482                 default:
1483                         // FIXME: We will eventually simply ignore unsupported pNext structures
1484                         UNIMPLEMENTED();
1485                 }
1486         }
1487
1488         vkGetPhysicalDeviceFeatures(physicalDevice, &(pFeatures->features));
1489 }
1490
1491 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties)
1492 {
1493         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceProperties2* pProperties = 0x%X)", physicalDevice, pProperties);
1494
1495         void* pNext = pProperties->pNext;
1496         while(pNext)
1497         {
1498                 switch(*reinterpret_cast<const VkStructureType*>(pNext))
1499                 {
1500                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
1501                         {
1502                                 auto& properties = *reinterpret_cast<VkPhysicalDeviceIDProperties*>(pNext);
1503                                 vk::Cast(physicalDevice)->getProperties(&properties);
1504                                 pNext = properties.pNext;
1505                         }
1506                         break;
1507                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
1508                         {
1509                                 auto& properties = *reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(pNext);
1510                                 vk::Cast(physicalDevice)->getProperties(&properties);
1511                                 pNext = properties.pNext;
1512                         }
1513                         break;
1514                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
1515                         {
1516                                 auto& properties = *reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(pNext);
1517                                 vk::Cast(physicalDevice)->getProperties(&properties);
1518                                 pNext = properties.pNext;
1519                         }
1520                         break;
1521                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
1522                         {
1523                                 auto& properties = *reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(pNext);
1524                                 vk::Cast(physicalDevice)->getProperties(&properties);
1525                                 pNext = properties.pNext;
1526                         }
1527                         break;
1528                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
1529                         {
1530                                 auto& properties = *reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(pNext);
1531                                 vk::Cast(physicalDevice)->getProperties(&properties);
1532                                 pNext = properties.pNext;
1533                         }
1534                         break;
1535                 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES:
1536                         {
1537                                 auto& properties = *reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(pNext);
1538                                 vk::Cast(physicalDevice)->getProperties(&properties);
1539                                 pNext = properties.pNext;
1540                         }
1541                         break;
1542                 default:
1543                         // FIXME: We will eventually simply ignore unsupported pNext structures
1544                         UNIMPLEMENTED();
1545                 }
1546         }
1547
1548         vkGetPhysicalDeviceProperties(physicalDevice, &(pProperties->properties));
1549 }
1550
1551 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties)
1552 {
1553         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkFormat format = %d, VkFormatProperties2* pFormatProperties = 0x%X)",
1554                     physicalDevice, format, pFormatProperties);
1555
1556         if(pFormatProperties->pNext)
1557         {
1558                 UNIMPLEMENTED();
1559         }
1560
1561         vkGetPhysicalDeviceFormatProperties(physicalDevice, format, &(pFormatProperties->formatProperties));
1562 }
1563
1564 VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties)
1565 {
1566         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo = 0x%X, VkImageFormatProperties2* pImageFormatProperties = 0x%X)",
1567                     physicalDevice, pImageFormatInfo, pImageFormatProperties);
1568
1569         if(pImageFormatInfo->pNext || pImageFormatProperties->pNext)
1570         {
1571                 UNIMPLEMENTED();
1572         }
1573
1574         return vkGetPhysicalDeviceImageFormatProperties(physicalDevice,
1575                                                             pImageFormatInfo->format,
1576                                                             pImageFormatInfo->type,
1577                                                             pImageFormatInfo->tiling,
1578                                                             pImageFormatInfo->usage,
1579                                                             pImageFormatInfo->flags,
1580                                                             &(pImageFormatProperties->imageFormatProperties));
1581 }
1582
1583 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties)
1584 {
1585         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, uint32_t* pQueueFamilyPropertyCount = 0x%X, VkQueueFamilyProperties2* pQueueFamilyProperties = 0x%X)",
1586                 physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties);
1587
1588         if(pQueueFamilyProperties && pQueueFamilyProperties->pNext)
1589         {
1590                 UNIMPLEMENTED();
1591         }
1592
1593         vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount,
1594                 pQueueFamilyProperties ? &(pQueueFamilyProperties->queueFamilyProperties) : nullptr);
1595 }
1596
1597 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties)
1598 {
1599         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, VkPhysicalDeviceMemoryProperties2* pMemoryProperties = 0x%X)", physicalDevice, pMemoryProperties);
1600
1601         if(pMemoryProperties->pNext)
1602         {
1603                 UNIMPLEMENTED();
1604         }
1605
1606         vkGetPhysicalDeviceMemoryProperties(physicalDevice, &(pMemoryProperties->memoryProperties));
1607 }
1608
1609 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties)
1610 {
1611         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo = 0x%X, uint32_t* pPropertyCount = 0x%X, VkSparseImageFormatProperties2* pProperties = 0x%X)",
1612              physicalDevice, pFormatInfo, pPropertyCount, pProperties);
1613
1614         if(pProperties && pProperties->pNext)
1615         {
1616                 UNIMPLEMENTED();
1617         }
1618
1619         vkGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, pFormatInfo->format, pFormatInfo->type,
1620                                                        pFormatInfo->samples, pFormatInfo->usage, pFormatInfo->tiling,
1621                                                        pPropertyCount, pProperties ? &(pProperties->properties) : nullptr);
1622 }
1623
1624 VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags)
1625 {
1626         TRACE("()");
1627         UNIMPLEMENTED();
1628 }
1629
1630 VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue)
1631 {
1632         TRACE("(VkDevice device = 0x%X, const VkDeviceQueueInfo2* pQueueInfo = 0x%X, VkQueue* pQueue = 0x%X)",
1633               device, pQueueInfo, pQueue);
1634
1635         if(pQueueInfo->pNext)
1636         {
1637                 UNIMPLEMENTED();
1638         }
1639
1640         // The only flag that can be set here is VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT 
1641         // According to the Vulkan spec, 4.3.1. Queue Family Properties:
1642         // "VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT specifies that the device queue is a
1643         //  protected-capable queue. If the protected memory feature is not enabled,
1644         //  the VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT bit of flags must not be set."
1645         if(pQueueInfo->flags)
1646         {
1647                 *pQueue = VK_NULL_HANDLE;
1648         }
1649         else
1650         {
1651                 vkGetDeviceQueue(device, pQueueInfo->queueFamilyIndex, pQueueInfo->queueIndex, pQueue);
1652         }
1653 }
1654
1655 VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion)
1656 {
1657         TRACE("()");
1658         UNIMPLEMENTED();
1659         return VK_SUCCESS;
1660 }
1661
1662 VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator)
1663 {
1664         TRACE("()");
1665         UNIMPLEMENTED();
1666 }
1667
1668 VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate)
1669 {
1670         TRACE("()");
1671         UNIMPLEMENTED();
1672         return VK_SUCCESS;
1673 }
1674
1675 VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator)
1676 {
1677         TRACE("()");
1678         UNIMPLEMENTED();
1679 }
1680
1681 VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData)
1682 {
1683         TRACE("()");
1684         UNIMPLEMENTED();
1685 }
1686
1687 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties)
1688 {
1689         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo = 0x%X, VkExternalBufferProperties* pExternalBufferProperties = 0x%X)",
1690               physicalDevice, pExternalBufferInfo, pExternalBufferProperties);
1691
1692         vk::Cast(physicalDevice)->getExternalBufferProperties(pExternalBufferInfo, pExternalBufferProperties);
1693 }
1694
1695 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties)
1696 {
1697         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo = 0x%X, VkExternalFenceProperties* pExternalFenceProperties = 0x%X)",
1698               physicalDevice, pExternalFenceInfo, pExternalFenceProperties);
1699
1700         vk::Cast(physicalDevice)->getExternalFenceProperties(pExternalFenceInfo, pExternalFenceProperties);
1701 }
1702
1703 VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties)
1704 {
1705         TRACE("(VkPhysicalDevice physicalDevice = 0x%X, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo = 0x%X, VkExternalSemaphoreProperties* pExternalSemaphoreProperties = 0x%X)",
1706               physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties);
1707
1708         vk::Cast(physicalDevice)->getExternalSemaphoreProperties(pExternalSemaphoreInfo, pExternalSemaphoreProperties);
1709 }
1710
1711 VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport)
1712 {
1713         TRACE("(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport)",
1714               device, pCreateInfo, pSupport);
1715
1716         vk::Cast(device)->getDescriptorSetLayoutSupport(pCreateInfo, pSupport);
1717 }
1718
1719 }