Rebased ref, commits from common ancestor: commit 77f8fc721521bc562c7cb385d3ea6e87b5d9e0a9 Author: Mark Young <ma...@lunarg.com> Date: Mon Nov 21 16:20:06 2016 -0700
loader: Fix debug report memory leaks Found a couple of memory leaks in the debug report code in the loader while testing out allocators in cube. Change-Id: I56b401394ca43bd8eb9b4f85baa52dfa597a6f49 diff --git a/loader/debug_report.c b/loader/debug_report.c index 8ad4102..a54314a 100644 --- a/loader/debug_report.c +++ b/loader/debug_report.c @@ -215,14 +215,18 @@ VkResult util_CopyDebugReportCreateInfos( ((VkDebugReportCallbackEXT *)pAllocator->pfnAllocation( pAllocator->pUserData, n * sizeof(VkDebugReportCallbackEXT), sizeof(void *), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT)); + if (!pCallbacks) { + pAllocator->pfnFree(pAllocator->pUserData, pInfos); + return VK_ERROR_OUT_OF_HOST_MEMORY; + } } else { #endif pCallbacks = *callbacks = ((VkDebugReportCallbackEXT *)malloc( n * sizeof(VkDebugReportCallbackEXT))); - } - if (!pCallbacks) { - free(pInfos); - return VK_ERROR_OUT_OF_HOST_MEMORY; + if (!pCallbacks) { + free(pInfos); + return VK_ERROR_OUT_OF_HOST_MEMORY; + } } // 4th, copy each VkDebugReportCallbackCreateInfoEXT for use by // vkDestroyInstance, and assign a unique handle to each callback (just @@ -244,8 +248,17 @@ VkResult util_CopyDebugReportCreateInfos( void util_FreeDebugReportCreateInfos(const VkAllocationCallbacks *pAllocator, VkDebugReportCallbackCreateInfoEXT *infos, VkDebugReportCallbackEXT *callbacks) { - free(infos); - free(callbacks); +#if (DEBUG_DISABLE_APP_ALLOCATORS == 1) + { +#else + if (pAllocator != NULL) { + pAllocator->pfnFree(pAllocator->pUserData, infos); + pAllocator->pfnFree(pAllocator->pUserData, callbacks); + } else { +#endif + free(infos); + free(callbacks); + } } VkResult util_CreateDebugReportCallbacks( @@ -450,6 +463,16 @@ VKAPI_ATTR void VKAPI_CALL terminator_DestroyDebugReportCallback( } storage_idx++; } + +#if (DEBUG_DISABLE_APP_ALLOCATORS == 1) + { +#else + if (pAllocator != NULL) { + pAllocator->pfnFree(pAllocator->pUserData, icd_info); + } else { +#endif + free(icd_info); + } } /* commit 8215e0d6c5c0ddd13a7ddc3d8f5965ed92fe0e24 Author: Mark Young <ma...@lunarg.com> Date: Tue Nov 22 08:44:21 2016 -0700 docs: Fix loader doc mention of linux dirs The Linux "Properly-Installed ICDs" section wasn't coming across into HTML properly. Change-Id: I2538b3c027c88ad5923d23f554bba1734c60ec06 diff --git a/loader/LoaderAndLayerInterface.md b/loader/LoaderAndLayerInterface.md index 104eccc..c3492d3 100644 --- a/loader/LoaderAndLayerInterface.md +++ b/loader/LoaderAndLayerInterface.md @@ -464,11 +464,13 @@ Notice the semi-colon between "C:\\Windows\\System32\\vendorc\_icd.json" and In order to find properly-installed ICDs, the Vulkan loader will scan the files in the following Linux directories: +``` /usr/local/etc/vulkan/icd.d /usr/local/share/vulkan/icd.d /etc/vulkan/icd.d /usr/share/vulkan/icd.d $HOME/.local/share/vulkan/icd.d +``` The "/usr/local/*" directories can be configured to be other directories at build time. commit 3fb0832efefc683ab475875a46390d5cbd213901 Author: Tony Barbour <t...@lunarg.com> Date: Mon Nov 21 12:56:25 2016 -0700 demos: Set attachment description flag bits in cube Fixes a cubepp crash running on AMD Change-Id: Ie8ef8625a2e8a8a416bcbfe4a62871fef5e07f71 diff --git a/demos/cube.c b/demos/cube.c index fb8b7c1..0cd7e0f 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1549,6 +1549,7 @@ static void demo_prepare_render_pass(struct demo *demo) { [0] = { .format = demo->format, + .flags = 0, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR, .storeOp = VK_ATTACHMENT_STORE_OP_STORE, @@ -1560,6 +1561,7 @@ static void demo_prepare_render_pass(struct demo *demo) { [1] = { .format = demo->depth.format, + .flags = 0, .samples = VK_SAMPLE_COUNT_1_BIT, .loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR, .storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE, @@ -1593,6 +1595,7 @@ static void demo_prepare_render_pass(struct demo *demo) { const VkRenderPassCreateInfo rp_info = { .sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, .pNext = NULL, + .flags = 0, .attachmentCount = 2, .pAttachments = attachments, .subpassCount = 1, diff --git a/demos/cube.cpp b/demos/cube.cpp index e91b0c3..4c6acd3 100644 --- a/demos/cube.cpp +++ b/demos/cube.cpp @@ -1742,7 +1742,6 @@ struct Demo { // the renderpass, no barriers are necessary. const vk::AttachmentDescription attachments[2] = { vk::AttachmentDescription() - .setFlags(vk::AttachmentDescriptionFlagBits::eMayAlias) .setFormat(format) .setSamples(vk::SampleCountFlagBits::e1) .setLoadOp(vk::AttachmentLoadOp::eClear) @@ -1752,7 +1751,6 @@ struct Demo { .setInitialLayout(vk::ImageLayout::eUndefined) .setFinalLayout(vk::ImageLayout::ePresentSrcKHR), vk::AttachmentDescription() - .setFlags(vk::AttachmentDescriptionFlagBits::eMayAlias) .setFormat(depth.format) .setSamples(vk::SampleCountFlagBits::e1) .setLoadOp(vk::AttachmentLoadOp::eClear) commit 11259fc3c7ba493d7041f047f19d7ce39d7c379f Author: David Pinedo <da...@lunarg.com> Date: Thu Nov 17 15:03:16 2016 -0700 codegen: change script to handle NV ext structs Modified vk_helper.py to handle NV-specific structures diff --git a/vk_helper.py b/vk_helper.py index 6d29063..9412650 100755 --- a/vk_helper.py +++ b/vk_helper.py @@ -377,8 +377,6 @@ def recreate_structs(): def get_struct_name_from_struct_type(struct_type): # Note: All struct types are now camel-case # Debug Report has an inconsistency - so need special case. - if ("VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT" == struct_type): - return "VkDebugReportCallbackCreateInfoEXT" caps_struct_name = struct_type.replace("_STRUCTURE_TYPE", "") char_idx = 0 struct_name = '' @@ -391,6 +389,12 @@ def get_struct_name_from_struct_type(struct_type): struct_name += caps_struct_name[char_idx].lower() char_idx += 1 + # Vendor extension structs ending in vendor TLA need to be uppercase. + if (caps_struct_name[-2:] == "NV"): + struct_name = struct_name[:-2] + caps_struct_name[-2:] + if ((caps_struct_name[-3:] == "AMD") or (caps_struct_name[-3:] == "IMG") or (caps_struct_name[-3:] == "EXT")): + struct_name = struct_name[:-3] + caps_struct_name[-3:] + return struct_name # Emit an ifdef if incoming func matches a platform identifier @@ -1163,12 +1167,16 @@ class StructWrapperGen: struct_name = get_struct_name_from_struct_type(v) if struct_name not in self.struct_dict: continue + if 'WIN32' in v: + sh_funcs.append("#ifdef VK_USE_PLATFORM_WIN32_KHR") print_func_name = self._get_sh_func_name(struct_name) #sh_funcs.append('string %s(const %s* pStruct, const string prefix);' % (self._get_sh_func_name(s), typedef_fwd_dict[s])) sh_funcs.append(' case %s:\n {' % (v)) sh_funcs.append(' return %s((%s*)pStruct, indent);' % (print_func_name, struct_name)) sh_funcs.append(' }') sh_funcs.append(' break;') + if 'WIN32' in v: + sh_funcs.append("#endif // VK_USE_PLATFORM_WIN32_KHR") sh_funcs.append(" default:") sh_funcs.append(" return string();") sh_funcs.append('%s' % lineinfo.get()) @@ -1418,7 +1426,7 @@ class StructWrapperGen: sh_funcs.append('%s}' % (indent)) else: sh_funcs.append('%sstructSize += pStruct->%s*sizeof(%s);' % (indent, self.struct_dict[s][m]['array_size'], self.struct_dict[s][m]['type'])) - elif self.struct_dict[s][m]['ptr'] and 'pNext' != self.struct_dict[s][m]['name']: + elif self.struct_dict[s][m]['ptr'] and 'pNext' != self.struct_dict[s][m]['name'] and 'dpy' != self.struct_dict[s][m]['name']: if 'char' in self.struct_dict[s][m]['type'].lower(): sh_funcs.append('%sstructSize += (pStruct->%s != NULL) ? sizeof(%s)*(1+strlen(pStruct->%s)) : 0;' % (indent, self.struct_dict[s][m]['name'], self.struct_dict[s][m]['type'], self.struct_dict[s][m]['name'])) elif is_type(self.struct_dict[s][m]['type'], 'struct'): @@ -1460,6 +1468,8 @@ class StructWrapperGen: if struct_name not in self.struct_dict: continue + if 'WIN32' in v: + sh_funcs.append("#ifdef VK_USE_PLATFORM_WIN32_KHR") sh_funcs.append('%scase %s:' % (indent, v)) sh_funcs.append('%s{' % (indent)) indent += ' ' @@ -1467,6 +1477,8 @@ class StructWrapperGen: sh_funcs.append('%sbreak;' % (indent)) indent = indent[:-4] sh_funcs.append('%s}' % (indent)) + if 'WIN32' in v: + sh_funcs.append("#endif // VK_USE_PLATFORM_WIN32_KHR") sh_funcs.append('%sdefault:' % (indent)) indent += ' ' sh_funcs.append('%sassert(0);' % (indent)) commit 07467d23d3233ff1ea7efc702d0e9ebfc72f379c Author: Mark Lobodzinski <m...@lunarg.com> Date: Thu Nov 17 10:20:12 2016 -0700 Revert "layers: Update vulkan.py with new extensions" This reverts commit f504ff6e45bb15a0517a8de2e2d75e90df7e4627. This caused huge issues in the VulkanTools repo, reverting for now. diff --git a/vulkan.py b/vulkan.py index a42ca3b..9000765 100644 --- a/vulkan.py +++ b/vulkan.py @@ -1,8 +1,9 @@ -"""Vulkan API description""" -# See vulkan_api_generator.py for modifications +" ""VK API description""" # Copyright (c) 2015-2016 The Khronos Group Inc. -# Copyright (c) 2015-2016 Valve Corporation# Copyright (c) 2015-2016 LunarG, Inc.# Copyright (c) 2015-2016 Google Inc. +# Copyright (c) 2015-2016 Valve Corporation +# Copyright (c) 2015-2016 LunarG, Inc. +# Copyright (c) 2015-2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,11 +23,9 @@ # Author: Tobin Ehlis <to...@lunarg.com> # Author: Tony Barbour <t...@lunarg.com> # Author: Gwan-gyeong Mun <kk.m...@samsung.com> -# Author: Mark Lobodzinski <m...@lunarg.com> -# class Param(object): - """Function parameter""" + """A function parameter.""" def __init__(self, ty, name): self.ty = ty @@ -42,11 +41,33 @@ class Param(object): else: return "%s %s" % (self.ty, self.name) + def indirection_level(self): + """Return the level of indirection.""" + return self.ty.count("*") + self.ty.count("[") + + def dereferenced_type(self, level=0): + """Return the type after dereferencing.""" + if not level: + level = self.indirection_level() + + deref = self.ty if level else "" + while level > 0: + idx = deref.rfind("[") + if idx < 0: + idx = deref.rfind("*") + if idx < 0: + deref = "" + break + deref = deref[:idx] + level -= 1; + + return deref.rstrip() + class Proto(object): - """Function prototype""" + """A function prototype.""" def __init__(self, ret, name, params=[]): - # Prototype has only a param + # the proto has only a param if not isinstance(params, list): params = [params] @@ -89,11 +110,13 @@ class Proto(object): idx = param.ty.find("[") if idx < 0: idx = len(param.ty) + pad = 44 - idx if pad <= 0: pad = 1 - plist.append(" %s%s%s%s" % (param.ty[:idx], " " * pad, param.name, param.ty[idx:])) + plist.append(" %s%s%s%s" % (param.ty[:idx], + " " * pad, param.name, param.ty[idx:])) return "%s%s %s%s(\n%s)" % ( attr + "_ATTR " if attr else "", @@ -114,13 +137,19 @@ class Proto(object): """Return the params that are simple VK objects and are inputs.""" return [param for param in self.params if param.ty in objects] + def object_out_params(self): + """Return the params that are simple VK objects and are outputs.""" + return [param for param in self.params + if param.dereferenced_type() in objects] + def __repr__(self): param_strs = [] for param in self.params: param_strs.append(str(param)) param_str = " [%s]" % (",\n ".join(param_strs)) - return "Proto(\"%s\", \"%s\",\n%s)" % (self.ret, self.name, param_str) + return "Proto(\"%s\", \"%s\",\n%s)" % \ + (self.ret, self.name, param_str) class Extension(object): def __init__(self, name, headers, objects, protos, ifdef = None): @@ -130,1537 +159,1262 @@ class Extension(object): self.protos = protos self.ifdef = ifdef - +# VK core API VK_VERSION_1_0 = Extension( name="VK_VERSION_1_0", headers=["vulkan/vulkan.h"], - ifdef="", objects=[ "VkInstance", "VkPhysicalDevice", "VkDevice", "VkQueue", + "VkSemaphore", + "VkCommandBuffer", "VkFence", "VkDeviceMemory", "VkBuffer", "VkImage", - "VkSemaphore", "VkEvent", "VkQueryPool", "VkBufferView", "VkImageView", "VkShaderModule", "VkPipelineCache", - "VkPipeline", "VkPipelineLayout", - "VkSampler", + "VkRenderPass", + "VkPipeline", "VkDescriptorSetLayout", + "VkSampler", "VkDescriptorPool", "VkDescriptorSet", "VkFramebuffer", - "VkRenderPass", "VkCommandPool", - "VkCommandBuffer", ], protos=[ Proto("VkResult", "CreateInstance", - [ - Param("VkInstanceCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkInstance", "pInstance"), - ]), + [Param("const VkInstanceCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkInstance*", "pInstance")]), + Proto("void", "DestroyInstance", - [ - Param("VkInstance", "instance"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + [Param("VkInstance", "instance"), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "EnumeratePhysicalDevices", - [ - Param("VkInstance", "instance"), - Param("uint32_t", "pPhysicalDeviceCount"), - Param("VkPhysicalDevice", "pPhysicalDevices"), - ]), + [Param("VkInstance", "instance"), + Param("uint32_t*", "pPhysicalDeviceCount"), + Param("VkPhysicalDevice*", "pPhysicalDevices")]), + Proto("void", "GetPhysicalDeviceFeatures", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("VkPhysicalDeviceFeatures", "pFeatures"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("VkPhysicalDeviceFeatures*", "pFeatures")]), + Proto("void", "GetPhysicalDeviceFormatProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), + [Param("VkPhysicalDevice", "physicalDevice"), Param("VkFormat", "format"), - Param("VkFormatProperties", "pFormatProperties"), - ]), + Param("VkFormatProperties*", "pFormatProperties")]), + Proto("VkResult", "GetPhysicalDeviceImageFormatProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), + [Param("VkPhysicalDevice", "physicalDevice"), Param("VkFormat", "format"), Param("VkImageType", "type"), Param("VkImageTiling", "tiling"), Param("VkImageUsageFlags", "usage"), Param("VkImageCreateFlags", "flags"), - Param("VkImageFormatProperties", "pImageFormatProperties"), - ]), + Param("VkImageFormatProperties*", "pImageFormatProperties")]), + Proto("void", "GetPhysicalDeviceProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("VkPhysicalDeviceProperties", "pProperties"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("VkPhysicalDeviceProperties*", "pProperties")]), + Proto("void", "GetPhysicalDeviceQueueFamilyProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("uint32_t", "pQueueFamilyPropertyCount"), - Param("VkQueueFamilyProperties", "pQueueFamilyProperties"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("uint32_t*", "pQueueFamilyPropertyCount"), + Param("VkQueueFamilyProperties*", "pQueueFamilyProperties")]), + Proto("void", "GetPhysicalDeviceMemoryProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("VkPhysicalDeviceMemoryProperties", "pMemoryProperties"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]), + Proto("PFN_vkVoidFunction", "GetInstanceProcAddr", - [ - Param("VkInstance", "instance"), - Param("char", "pName"), - ]), + [Param("VkInstance", "instance"), + Param("const char*", "pName")]), + Proto("PFN_vkVoidFunction", "GetDeviceProcAddr", - [ - Param("VkDevice", "device"), - Param("char", "pName"), - ]), + [Param("VkDevice", "device"), + Param("const char*", "pName")]), + Proto("VkResult", "CreateDevice", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("VkDeviceCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkDevice", "pDevice"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("const VkDeviceCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkDevice*", "pDevice")]), + Proto("void", "DestroyDevice", - [ - Param("VkDevice", "device"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + [Param("VkDevice", "device"), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "EnumerateInstanceExtensionProperties", - [ - Param("char", "pLayerName"), - Param("uint32_t", "pPropertyCount"), - Param("VkExtensionProperties", "pProperties"), - ]), + [Param("const char*", "pLayerName"), + Param("uint32_t*", "pPropertyCount"), + Param("VkExtensionProperties*", "pProperties")]), + Proto("VkResult", "EnumerateDeviceExtensionProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("char", "pLayerName"), - Param("uint32_t", "pPropertyCount"), - Param("VkExtensionProperties", "pProperties"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("const char*", "pLayerName"), + Param("uint32_t*", "pPropertyCount"), + Param("VkExtensionProperties*", "pProperties")]), + Proto("VkResult", "EnumerateInstanceLayerProperties", - [ - Param("uint32_t", "pPropertyCount"), - Param("VkLayerProperties", "pProperties"), - ]), + [Param("uint32_t*", "pPropertyCount"), + Param("VkLayerProperties*", "pProperties")]), + Proto("VkResult", "EnumerateDeviceLayerProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), - Param("uint32_t", "pPropertyCount"), - Param("VkLayerProperties", "pProperties"), - ]), + [Param("VkPhysicalDevice", "physicalDevice"), + Param("uint32_t*", "pPropertyCount"), + Param("VkLayerProperties*", "pProperties")]), + Proto("void", "GetDeviceQueue", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("uint32_t", "queueFamilyIndex"), Param("uint32_t", "queueIndex"), - Param("VkQueue", "pQueue"), - ]), + Param("VkQueue*", "pQueue")]), + Proto("VkResult", "QueueSubmit", - [ - Param("VkQueue", "queue"), + [Param("VkQueue", "queue"), Param("uint32_t", "submitCount"), - Param("VkSubmitInfo", "pSubmits"), - Param("VkFence", "fence"), - ]), + Param("const VkSubmitInfo*", "pSubmits"), + Param("VkFence", "fence")]), + Proto("VkResult", "QueueWaitIdle", - [ - Param("VkQueue", "queue"), - ]), + [Param("VkQueue", "queue")]), + Proto("VkResult", "DeviceWaitIdle", - [ - Param("VkDevice", "device"), - ]), + [Param("VkDevice", "device")]), + Proto("VkResult", "AllocateMemory", - [ - Param("VkDevice", "device"), - Param("VkMemoryAllocateInfo", "pAllocateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkDeviceMemory", "pMemory"), - ]), + [Param("VkDevice", "device"), + Param("const VkMemoryAllocateInfo*", "pAllocateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkDeviceMemory*", "pMemory")]), + Proto("void", "FreeMemory", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkDeviceMemory", "memory"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "MapMemory", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkDeviceMemory", "memory"), Param("VkDeviceSize", "offset"), Param("VkDeviceSize", "size"), Param("VkMemoryMapFlags", "flags"), - Param("void", "ppData"), - ]), + Param("void**", "ppData")]), + Proto("void", "UnmapMemory", - [ - Param("VkDevice", "device"), - Param("VkDeviceMemory", "memory"), - ]), + [Param("VkDevice", "device"), + Param("VkDeviceMemory", "memory")]), + Proto("VkResult", "FlushMappedMemoryRanges", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("uint32_t", "memoryRangeCount"), - Param("VkMappedMemoryRange", "pMemoryRanges"), - ]), + Param("const VkMappedMemoryRange*", "pMemoryRanges")]), + Proto("VkResult", "InvalidateMappedMemoryRanges", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("uint32_t", "memoryRangeCount"), - Param("VkMappedMemoryRange", "pMemoryRanges"), - ]), + Param("const VkMappedMemoryRange*", "pMemoryRanges")]), + Proto("void", "GetDeviceMemoryCommitment", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkDeviceMemory", "memory"), - Param("VkDeviceSize", "pCommittedMemoryInBytes"), - ]), + Param("VkDeviceSize*", "pCommittedMemoryInBytes")]), + Proto("VkResult", "BindBufferMemory", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkBuffer", "buffer"), Param("VkDeviceMemory", "memory"), - Param("VkDeviceSize", "memoryOffset"), - ]), + Param("VkDeviceSize", "memoryOffset")]), + Proto("VkResult", "BindImageMemory", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImage", "image"), Param("VkDeviceMemory", "memory"), - Param("VkDeviceSize", "memoryOffset"), - ]), + Param("VkDeviceSize", "memoryOffset")]), + Proto("void", "GetBufferMemoryRequirements", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkBuffer", "buffer"), - Param("VkMemoryRequirements", "pMemoryRequirements"), - ]), + Param("VkMemoryRequirements*", "pMemoryRequirements")]), + Proto("void", "GetImageMemoryRequirements", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImage", "image"), - Param("VkMemoryRequirements", "pMemoryRequirements"), - ]), + Param("VkMemoryRequirements*", "pMemoryRequirements")]), + Proto("void", "GetImageSparseMemoryRequirements", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImage", "image"), - Param("uint32_t", "pSparseMemoryRequirementCount"), - Param("VkSparseImageMemoryRequirements", "pSparseMemoryRequirements"), - ]), + Param("uint32_t*", "pSparseMemoryRequirementCount"), + Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]), + Proto("void", "GetPhysicalDeviceSparseImageFormatProperties", - [ - Param("VkPhysicalDevice", "physicalDevice"), + [Param("VkPhysicalDevice", "physicalDevice"), Param("VkFormat", "format"), Param("VkImageType", "type"), Param("VkSampleCountFlagBits", "samples"), Param("VkImageUsageFlags", "usage"), Param("VkImageTiling", "tiling"), - Param("uint32_t", "pPropertyCount"), - Param("VkSparseImageFormatProperties", "pProperties"), - ]), + Param("uint32_t*", "pPropertyCount"), + Param("VkSparseImageFormatProperties*", "pProperties")]), + Proto("VkResult", "QueueBindSparse", - [ - Param("VkQueue", "queue"), + [Param("VkQueue", "queue"), Param("uint32_t", "bindInfoCount"), - Param("VkBindSparseInfo", "pBindInfo"), - Param("VkFence", "fence"), - ]), + Param("const VkBindSparseInfo*", "pBindInfo"), + Param("VkFence", "fence")]), + Proto("VkResult", "CreateFence", - [ - Param("VkDevice", "device"), - Param("VkFenceCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkFence", "pFence"), - ]), + [Param("VkDevice", "device"), + Param("const VkFenceCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkFence*", "pFence")]), + Proto("void", "DestroyFence", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkFence", "fence"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "ResetFences", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("uint32_t", "fenceCount"), - Param("VkFence", "pFences"), - ]), + Param("const VkFence*", "pFences")]), + Proto("VkResult", "GetFenceStatus", - [ - Param("VkDevice", "device"), - Param("VkFence", "fence"), - ]), + [Param("VkDevice", "device"), + Param("VkFence", "fence")]), + Proto("VkResult", "WaitForFences", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("uint32_t", "fenceCount"), - Param("VkFence", "pFences"), + Param("const VkFence*", "pFences"), Param("VkBool32", "waitAll"), - Param("uint64_t", "timeout"), - ]), + Param("uint64_t", "timeout")]), + Proto("VkResult", "CreateSemaphore", - [ - Param("VkDevice", "device"), - Param("VkSemaphoreCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkSemaphore", "pSemaphore"), - ]), + [Param("VkDevice", "device"), + Param("const VkSemaphoreCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkSemaphore*", "pSemaphore")]), + Proto("void", "DestroySemaphore", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkSemaphore", "semaphore"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "CreateEvent", - [ - Param("VkDevice", "device"), - Param("VkEventCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkEvent", "pEvent"), - ]), + [Param("VkDevice", "device"), + Param("const VkEventCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkEvent*", "pEvent")]), + Proto("void", "DestroyEvent", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkEvent", "event"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "GetEventStatus", - [ - Param("VkDevice", "device"), - Param("VkEvent", "event"), - ]), + [Param("VkDevice", "device"), + Param("VkEvent", "event")]), + Proto("VkResult", "SetEvent", - [ - Param("VkDevice", "device"), - Param("VkEvent", "event"), - ]), + [Param("VkDevice", "device"), + Param("VkEvent", "event")]), + Proto("VkResult", "ResetEvent", - [ - Param("VkDevice", "device"), - Param("VkEvent", "event"), - ]), + [Param("VkDevice", "device"), + Param("VkEvent", "event")]), + Proto("VkResult", "CreateQueryPool", - [ - Param("VkDevice", "device"), - Param("VkQueryPoolCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkQueryPool", "pQueryPool"), - ]), + [Param("VkDevice", "device"), + Param("const VkQueryPoolCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkQueryPool*", "pQueryPool")]), + Proto("void", "DestroyQueryPool", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkQueryPool", "queryPool"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "GetQueryPoolResults", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkQueryPool", "queryPool"), Param("uint32_t", "firstQuery"), Param("uint32_t", "queryCount"), Param("size_t", "dataSize"), - Param("void", "pData"), + Param("void*", "pData"), Param("VkDeviceSize", "stride"), - Param("VkQueryResultFlags", "flags"), - ]), + Param("VkQueryResultFlags", "flags")]), + Proto("VkResult", "CreateBuffer", - [ - Param("VkDevice", "device"), - Param("VkBufferCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkBuffer", "pBuffer"), - ]), + [Param("VkDevice", "device"), + Param("const VkBufferCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkBuffer*", "pBuffer")]), + Proto("void", "DestroyBuffer", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkBuffer", "buffer"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "CreateBufferView", - [ - Param("VkDevice", "device"), - Param("VkBufferViewCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkBufferView", "pView"), - ]), + [Param("VkDevice", "device"), + Param("const VkBufferViewCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkBufferView*", "pView")]), + Proto("void", "DestroyBufferView", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkBufferView", "bufferView"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "CreateImage", - [ - Param("VkDevice", "device"), - Param("VkImageCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkImage", "pImage"), - ]), + [Param("VkDevice", "device"), + Param("const VkImageCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkImage*", "pImage")]), + Proto("void", "DestroyImage", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImage", "image"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("void", "GetImageSubresourceLayout", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImage", "image"), - Param("VkImageSubresource", "pSubresource"), - Param("VkSubresourceLayout", "pLayout"), - ]), + Param("const VkImageSubresource*", "pSubresource"), + Param("VkSubresourceLayout*", "pLayout")]), + Proto("VkResult", "CreateImageView", - [ - Param("VkDevice", "device"), - Param("VkImageViewCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkImageView", "pView"), - ]), + [Param("VkDevice", "device"), + Param("const VkImageViewCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkImageView*", "pView")]), + Proto("void", "DestroyImageView", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkImageView", "imageView"), - Param("VkAllocationCallbacks", "pAllocator"), - ]), + Param("const VkAllocationCallbacks*", "pAllocator")]), + Proto("VkResult", "CreateShaderModule", - [ - Param("VkDevice", "device"), - Param("VkShaderModuleCreateInfo", "pCreateInfo"), - Param("VkAllocationCallbacks", "pAllocator"), - Param("VkShaderModule", "pShaderModule"), - ]), + [Param("VkDevice", "device"), + Param("const VkShaderModuleCreateInfo*", "pCreateInfo"), + Param("const VkAllocationCallbacks*", "pAllocator"), + Param("VkShaderModule*", "pShaderModule")]), + Proto("void", "DestroyShaderModule", - [ - Param("VkDevice", "device"), + [Param("VkDevice", "device"), Param("VkShaderModule", "shaderModule"),