bug 12921: Memory callback (WIP)
The per-object allocator is ignored for now.
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=12921
diff --git a/vulkan.py b/vulkan.py
index a57d199..3f0c706 100755
--- a/vulkan.py
+++ b/vulkan.py
@@ -213,10 +213,12 @@
protos=[
Proto("VkResult", "CreateInstance",
[Param("const VkInstanceCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkInstance*", "pInstance")]),
Proto("void", "DestroyInstance",
- [Param("VkInstance", "instance")]),
+ [Param("VkInstance", "instance"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "EnumeratePhysicalDevices",
[Param("VkInstance", "instance"),
@@ -265,10 +267,12 @@
Proto("VkResult", "CreateDevice",
[Param("VkPhysicalDevice", "physicalDevice"),
Param("const VkDeviceCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkDevice*", "pDevice")]),
Proto("void", "DestroyDevice",
- [Param("VkDevice", "device")]),
+ [Param("VkDevice", "device"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "EnumerateInstanceExtensionProperties",
[Param("const char*", "pLayerName"),
@@ -311,11 +315,13 @@
Proto("VkResult", "AllocMemory",
[Param("VkDevice", "device"),
Param("const VkMemoryAllocInfo*", "pAllocInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkDeviceMemory*", "pMem")]),
Proto("void", "FreeMemory",
[Param("VkDevice", "device"),
- Param("VkDeviceMemory", "mem")]),
+ Param("VkDeviceMemory", "mem"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "MapMemory",
[Param("VkDevice", "device"),
@@ -403,11 +409,13 @@
Proto("VkResult", "CreateFence",
[Param("VkDevice", "device"),
Param("const VkFenceCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkFence*", "pFence")]),
Proto("void", "DestroyFence",
[Param("VkDevice", "device"),
- Param("VkFence", "fence")]),
+ Param("VkFence", "fence"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "ResetFences",
[Param("VkDevice", "device"),
@@ -428,20 +436,24 @@
Proto("VkResult", "CreateSemaphore",
[Param("VkDevice", "device"),
Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkSemaphore*", "pSemaphore")]),
Proto("void", "DestroySemaphore",
[Param("VkDevice", "device"),
- Param("VkSemaphore", "semaphore")]),
+ Param("VkSemaphore", "semaphore"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateEvent",
[Param("VkDevice", "device"),
Param("const VkEventCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkEvent*", "pEvent")]),
Proto("void", "DestroyEvent",
[Param("VkDevice", "device"),
- Param("VkEvent", "event")]),
+ Param("VkEvent", "event"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "GetEventStatus",
[Param("VkDevice", "device"),
@@ -458,11 +470,13 @@
Proto("VkResult", "CreateQueryPool",
[Param("VkDevice", "device"),
Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkQueryPool*", "pQueryPool")]),
Proto("void", "DestroyQueryPool",
[Param("VkDevice", "device"),
- Param("VkQueryPool", "queryPool")]),
+ Param("VkQueryPool", "queryPool"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "GetQueryPoolResults",
[Param("VkDevice", "device"),
@@ -477,29 +491,35 @@
Proto("VkResult", "CreateBuffer",
[Param("VkDevice", "device"),
Param("const VkBufferCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkBuffer*", "pBuffer")]),
Proto("void", "DestroyBuffer",
[Param("VkDevice", "device"),
- Param("VkBuffer", "buffer")]),
+ Param("VkBuffer", "buffer"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateBufferView",
[Param("VkDevice", "device"),
Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkBufferView*", "pView")]),
Proto("void", "DestroyBufferView",
[Param("VkDevice", "device"),
- Param("VkBufferView", "bufferView")]),
+ Param("VkBufferView", "bufferView"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateImage",
[Param("VkDevice", "device"),
Param("const VkImageCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkImage*", "pImage")]),
Proto("void", "DestroyImage",
[Param("VkDevice", "device"),
- Param("VkImage", "image")]),
+ Param("VkImage", "image"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("void", "GetImageSubresourceLayout",
[Param("VkDevice", "device"),
@@ -510,38 +530,46 @@
Proto("VkResult", "CreateImageView",
[Param("VkDevice", "device"),
Param("const VkImageViewCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkImageView*", "pView")]),
Proto("void", "DestroyImageView",
[Param("VkDevice", "device"),
- Param("VkImageView", "imageView")]),
+ Param("VkImageView", "imageView"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateShaderModule",
[Param("VkDevice", "device"),
Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkShaderModule*", "pShaderModule")]),
Proto("void", "DestroyShaderModule",
[Param("VkDevice", "device"),
- Param("VkShaderModule", "shaderModule")]),
+ Param("VkShaderModule", "shaderModule"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateShader",
[Param("VkDevice", "device"),
Param("const VkShaderCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkShader*", "pShader")]),
Proto("void", "DestroyShader",
[Param("VkDevice", "device"),
- Param("VkShader", "shader")]),
+ Param("VkShader", "shader"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreatePipelineCache",
[Param("VkDevice", "device"),
Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkPipelineCache*", "pPipelineCache")]),
Proto("void", "DestroyPipelineCache",
[Param("VkDevice", "device"),
- Param("VkPipelineCache", "pipelineCache")]),
+ Param("VkPipelineCache", "pipelineCache"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "GetPipelineCacheData",
[Param("VkDevice", "device"),
@@ -560,6 +588,7 @@
Param("VkPipelineCache", "pipelineCache"),
Param("uint32_t", "createInfoCount"),
Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkPipeline*", "pPipelines")]),
Proto("VkResult", "CreateComputePipelines",
@@ -567,47 +596,57 @@
Param("VkPipelineCache", "pipelineCache"),
Param("uint32_t", "createInfoCount"),
Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkPipeline*", "pPipelines")]),
Proto("void", "DestroyPipeline",
[Param("VkDevice", "device"),
- Param("VkPipeline", "pipeline")]),
+ Param("VkPipeline", "pipeline"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreatePipelineLayout",
[Param("VkDevice", "device"),
Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkPipelineLayout*", "pPipelineLayout")]),
Proto("void", "DestroyPipelineLayout",
[Param("VkDevice", "device"),
- Param("VkPipelineLayout", "pipelineLayout")]),
+ Param("VkPipelineLayout", "pipelineLayout"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateSampler",
[Param("VkDevice", "device"),
Param("const VkSamplerCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkSampler*", "pSampler")]),
Proto("void", "DestroySampler",
[Param("VkDevice", "device"),
- Param("VkSampler", "sampler")]),
+ Param("VkSampler", "sampler"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateDescriptorSetLayout",
[Param("VkDevice", "device"),
Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkDescriptorSetLayout*", "pSetLayout")]),
Proto("void", "DestroyDescriptorSetLayout",
[Param("VkDevice", "device"),
- Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
+ Param("VkDescriptorSetLayout", "descriptorSetLayout"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateDescriptorPool",
[Param("VkDevice", "device"),
Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkDescriptorPool*", "pDescriptorPool")]),
Proto("void", "DestroyDescriptorPool",
[Param("VkDevice", "device"),
- Param("VkDescriptorPool", "descriptorPool")]),
+ Param("VkDescriptorPool", "descriptorPool"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "ResetDescriptorPool",
[Param("VkDevice", "device"),
@@ -635,20 +674,24 @@
Proto("VkResult", "CreateFramebuffer",
[Param("VkDevice", "device"),
Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkFramebuffer*", "pFramebuffer")]),
Proto("void", "DestroyFramebuffer",
[Param("VkDevice", "device"),
- Param("VkFramebuffer", "framebuffer")]),
+ Param("VkFramebuffer", "framebuffer"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "CreateRenderPass",
[Param("VkDevice", "device"),
Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkRenderPass*", "pRenderPass")]),
Proto("void", "DestroyRenderPass",
[Param("VkDevice", "device"),
- Param("VkRenderPass", "renderPass")]),
+ Param("VkRenderPass", "renderPass"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("void", "GetRenderAreaGranularity",
[Param("VkDevice", "device"),
@@ -658,11 +701,13 @@
Proto("VkResult", "CreateCommandPool",
[Param("VkDevice", "device"),
Param("const VkCmdPoolCreateInfo*", "pCreateInfo"),
+ Param("const VkAllocCallbacks*", "pAllocator"),
Param("VkCmdPool*", "pCmdPool")]),
Proto("void", "DestroyCommandPool",
[Param("VkDevice", "device"),
- Param("VkCmdPool", "cmdPool")]),
+ Param("VkCmdPool", "cmdPool"),
+ Param("const VkAllocCallbacks*", "pAllocator")]),
Proto("VkResult", "ResetCommandPool",
[Param("VkDevice", "device"),