OSDN Git Service

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