From 05a26a60c831f1dafc60a9f88b0d5cb2ca303d01 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 5 Oct 2015 20:50:51 -0700 Subject: [PATCH] vk/0.170.2: Make destructors return void --- include/vulkan/vulkan.h | 116 ++++++++++++++++++------------------ src/vulkan/anv_cmd_buffer.c | 8 +-- src/vulkan/anv_device.c | 71 +++++++--------------- src/vulkan/anv_image.c | 12 +--- src/vulkan/anv_pipeline.c | 20 ++----- src/vulkan/anv_query.c | 4 +- 6 files changed, 89 insertions(+), 142 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 5deb161274f..9962cc17179 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2067,7 +2067,7 @@ typedef struct { typedef VkResult (VKAPI *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance); -typedef VkResult (VKAPI *PFN_vkDestroyInstance)(VkInstance instance); +typedef void (VKAPI *PFN_vkDestroyInstance)(VkInstance instance); typedef VkResult (VKAPI *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); @@ -2080,7 +2080,7 @@ typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevi typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); typedef PFN_vkVoidFunction (VKAPI *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); typedef VkResult (VKAPI *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice); -typedef VkResult (VKAPI *PFN_vkDestroyDevice)(VkDevice device); +typedef void (VKAPI *PFN_vkDestroyDevice)(VkDevice device); typedef VkResult (VKAPI *PFN_vkGetGlobalExtensionProperties)(const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); typedef VkResult (VKAPI *PFN_vkGetPhysicalDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pCount, VkExtensionProperties* pProperties); typedef VkResult (VKAPI *PFN_vkGetGlobalLayerProperties)(uint32_t* pCount, VkLayerProperties* pProperties); @@ -2090,9 +2090,9 @@ typedef VkResult (VKAPI *PFN_vkQueueSubmit)(VkQueue queue, uint32_t cmdBufferCou typedef VkResult (VKAPI *PFN_vkQueueWaitIdle)(VkQueue queue); typedef VkResult (VKAPI *PFN_vkDeviceWaitIdle)(VkDevice device); typedef VkResult (VKAPI *PFN_vkAllocMemory)(VkDevice device, const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem); -typedef VkResult (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem); +typedef void (VKAPI *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory mem); typedef VkResult (VKAPI *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory mem, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); -typedef VkResult (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem); +typedef void (VKAPI *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory mem); typedef VkResult (VKAPI *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); typedef VkResult (VKAPI *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges); typedef VkResult (VKAPI *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); @@ -2106,75 +2106,75 @@ typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuf typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageOpaqueMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseMemoryBindInfo* pBindInfo); typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t numBindings, const VkSparseImageMemoryBindInfo* pBindInfo); typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence); -typedef VkResult (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence); +typedef void (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence); typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences); typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence); typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); typedef VkResult (VKAPI *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore); -typedef VkResult (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore); +typedef void (VKAPI *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore); typedef VkResult (VKAPI *PFN_vkQueueSignalSemaphore)(VkQueue queue, VkSemaphore semaphore); typedef VkResult (VKAPI *PFN_vkQueueWaitSemaphore)(VkQueue queue, VkSemaphore semaphore); typedef VkResult (VKAPI *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent); -typedef VkResult (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event); +typedef void (VKAPI *PFN_vkDestroyEvent)(VkDevice device, VkEvent event); typedef VkResult (VKAPI *PFN_vkGetEventStatus)(VkDevice device, VkEvent event); typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event); typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event); typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool); -typedef VkResult (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool); +typedef void (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool); typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags); typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer); -typedef VkResult (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer); +typedef void (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer); typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView); -typedef VkResult (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView); +typedef void (VKAPI *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView); typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage); -typedef VkResult (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image); +typedef void (VKAPI *PFN_vkDestroyImage)(VkDevice device, VkImage image); typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView); -typedef VkResult (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView); +typedef void (VKAPI *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView); typedef VkResult (VKAPI *PFN_vkCreateAttachmentView)(VkDevice device, const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView); -typedef VkResult (VKAPI *PFN_vkDestroyAttachmentView)(VkDevice device, VkAttachmentView attachmentView); +typedef void (VKAPI *PFN_vkDestroyAttachmentView)(VkDevice device, VkAttachmentView attachmentView); typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); -typedef VkResult (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule); +typedef void (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule); typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); -typedef VkResult (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); +typedef void (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); -typedef VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache); +typedef void (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache); typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache); typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData); typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); -typedef VkResult (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline); +typedef void (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline); typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout); -typedef VkResult (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout); +typedef void (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout); typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler); -typedef VkResult (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler); +typedef void (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler); typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); -typedef VkResult (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); +typedef void (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); -typedef VkResult (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); +typedef void (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount); typedef VkResult (VKAPI *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets); typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState); -typedef VkResult (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState); +typedef void (VKAPI *PFN_vkDestroyDynamicViewportState)(VkDevice device, VkDynamicViewportState dynamicViewportState); typedef VkResult (VKAPI *PFN_vkCreateDynamicRasterState)(VkDevice device, const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState); -typedef VkResult (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDynamicRasterState dynamicRasterState); +typedef void (VKAPI *PFN_vkDestroyDynamicRasterState)(VkDevice device, VkDynamicRasterState dynamicRasterState); typedef VkResult (VKAPI *PFN_vkCreateDynamicColorBlendState)(VkDevice device, const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); -typedef VkResult (VKAPI *PFN_vkDestroyDynamicColorBlendState)(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); +typedef void (VKAPI *PFN_vkDestroyDynamicColorBlendState)(VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); typedef VkResult (VKAPI *PFN_vkCreateDynamicDepthStencilState)(VkDevice device, const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); -typedef VkResult (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); +typedef void (VKAPI *PFN_vkDestroyDynamicDepthStencilState)(VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); typedef VkResult (VKAPI *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); -typedef VkResult (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer); +typedef void (VKAPI *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer); typedef VkResult (VKAPI *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); -typedef VkResult (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass); +typedef void (VKAPI *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass); typedef VkResult (VKAPI *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); typedef VkResult (VKAPI *PFN_vkCreateCommandPool)(VkDevice device, const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool); -typedef VkResult (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool); +typedef void (VKAPI *PFN_vkDestroyCommandPool)(VkDevice device, VkCmdPool cmdPool); typedef VkResult (VKAPI *PFN_vkResetCommandPool)(VkDevice device, VkCmdPool cmdPool, VkCmdPoolResetFlags flags); typedef VkResult (VKAPI *PFN_vkCreateCommandBuffer)(VkDevice device, const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer); -typedef VkResult (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer); +typedef void (VKAPI *PFN_vkDestroyCommandBuffer)(VkDevice device, VkCmdBuffer commandBuffer); typedef VkResult (VKAPI *PFN_vkBeginCommandBuffer)(VkCmdBuffer cmdBuffer, const VkCmdBufferBeginInfo* pBeginInfo); typedef VkResult (VKAPI *PFN_vkEndCommandBuffer)(VkCmdBuffer cmdBuffer); typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer, VkCmdBufferResetFlags flags); @@ -2224,7 +2224,7 @@ VkResult VKAPI vkCreateInstance( const VkInstanceCreateInfo* pCreateInfo, VkInstance* pInstance); -VkResult VKAPI vkDestroyInstance( +void VKAPI vkDestroyInstance( VkInstance instance); VkResult VKAPI vkEnumeratePhysicalDevices( @@ -2283,7 +2283,7 @@ VkResult VKAPI vkCreateDevice( const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice); -VkResult VKAPI vkDestroyDevice( +void VKAPI vkDestroyDevice( VkDevice device); VkResult VKAPI vkGetGlobalExtensionProperties( @@ -2329,7 +2329,7 @@ VkResult VKAPI vkAllocMemory( const VkMemoryAllocInfo* pAllocInfo, VkDeviceMemory* pMem); -VkResult VKAPI vkFreeMemory( +void VKAPI vkFreeMemory( VkDevice device, VkDeviceMemory mem); @@ -2341,7 +2341,7 @@ VkResult VKAPI vkMapMemory( VkMemoryMapFlags flags, void** ppData); -VkResult VKAPI vkUnmapMemory( +void VKAPI vkUnmapMemory( VkDevice device, VkDeviceMemory mem); @@ -2421,7 +2421,7 @@ VkResult VKAPI vkCreateFence( const VkFenceCreateInfo* pCreateInfo, VkFence* pFence); -VkResult VKAPI vkDestroyFence( +void VKAPI vkDestroyFence( VkDevice device, VkFence fence); @@ -2446,7 +2446,7 @@ VkResult VKAPI vkCreateSemaphore( const VkSemaphoreCreateInfo* pCreateInfo, VkSemaphore* pSemaphore); -VkResult VKAPI vkDestroySemaphore( +void VKAPI vkDestroySemaphore( VkDevice device, VkSemaphore semaphore); @@ -2463,7 +2463,7 @@ VkResult VKAPI vkCreateEvent( const VkEventCreateInfo* pCreateInfo, VkEvent* pEvent); -VkResult VKAPI vkDestroyEvent( +void VKAPI vkDestroyEvent( VkDevice device, VkEvent event); @@ -2484,7 +2484,7 @@ VkResult VKAPI vkCreateQueryPool( const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool); -VkResult VKAPI vkDestroyQueryPool( +void VKAPI vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool); @@ -2502,7 +2502,7 @@ VkResult VKAPI vkCreateBuffer( const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer); -VkResult VKAPI vkDestroyBuffer( +void VKAPI vkDestroyBuffer( VkDevice device, VkBuffer buffer); @@ -2511,7 +2511,7 @@ VkResult VKAPI vkCreateBufferView( const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView); -VkResult VKAPI vkDestroyBufferView( +void VKAPI vkDestroyBufferView( VkDevice device, VkBufferView bufferView); @@ -2520,7 +2520,7 @@ VkResult VKAPI vkCreateImage( const VkImageCreateInfo* pCreateInfo, VkImage* pImage); -VkResult VKAPI vkDestroyImage( +void VKAPI vkDestroyImage( VkDevice device, VkImage image); @@ -2535,7 +2535,7 @@ VkResult VKAPI vkCreateImageView( const VkImageViewCreateInfo* pCreateInfo, VkImageView* pView); -VkResult VKAPI vkDestroyImageView( +void VKAPI vkDestroyImageView( VkDevice device, VkImageView imageView); @@ -2544,7 +2544,7 @@ VkResult VKAPI vkCreateAttachmentView( const VkAttachmentViewCreateInfo* pCreateInfo, VkAttachmentView* pView); -VkResult VKAPI vkDestroyAttachmentView( +void VKAPI vkDestroyAttachmentView( VkDevice device, VkAttachmentView attachmentView); @@ -2553,7 +2553,7 @@ VkResult VKAPI vkCreateShaderModule( const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); -VkResult VKAPI vkDestroyShaderModule( +void VKAPI vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule); @@ -2562,7 +2562,7 @@ VkResult VKAPI vkCreateShader( const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); -VkResult VKAPI vkDestroyShader( +void VKAPI vkDestroyShader( VkDevice device, VkShader shader); @@ -2571,7 +2571,7 @@ VkResult VKAPI vkCreatePipelineCache( const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); -VkResult VKAPI vkDestroyPipelineCache( +void VKAPI vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache); @@ -2604,7 +2604,7 @@ VkResult VKAPI vkCreateComputePipelines( const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); -VkResult VKAPI vkDestroyPipeline( +void VKAPI vkDestroyPipeline( VkDevice device, VkPipeline pipeline); @@ -2613,7 +2613,7 @@ VkResult VKAPI vkCreatePipelineLayout( const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout); -VkResult VKAPI vkDestroyPipelineLayout( +void VKAPI vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout); @@ -2622,7 +2622,7 @@ VkResult VKAPI vkCreateSampler( const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler); -VkResult VKAPI vkDestroySampler( +void VKAPI vkDestroySampler( VkDevice device, VkSampler sampler); @@ -2631,7 +2631,7 @@ VkResult VKAPI vkCreateDescriptorSetLayout( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); -VkResult VKAPI vkDestroyDescriptorSetLayout( +void VKAPI vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout); @@ -2642,7 +2642,7 @@ VkResult VKAPI vkCreateDescriptorPool( const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); -VkResult VKAPI vkDestroyDescriptorPool( +void VKAPI vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool); @@ -2677,7 +2677,7 @@ VkResult VKAPI vkCreateDynamicViewportState( const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState); -VkResult VKAPI vkDestroyDynamicViewportState( +void VKAPI vkDestroyDynamicViewportState( VkDevice device, VkDynamicViewportState dynamicViewportState); @@ -2686,7 +2686,7 @@ VkResult VKAPI vkCreateDynamicRasterState( const VkDynamicRasterStateCreateInfo* pCreateInfo, VkDynamicRasterState* pState); -VkResult VKAPI vkDestroyDynamicRasterState( +void VKAPI vkDestroyDynamicRasterState( VkDevice device, VkDynamicRasterState dynamicRasterState); @@ -2695,7 +2695,7 @@ VkResult VKAPI vkCreateDynamicColorBlendState( const VkDynamicColorBlendStateCreateInfo* pCreateInfo, VkDynamicColorBlendState* pState); -VkResult VKAPI vkDestroyDynamicColorBlendState( +void VKAPI vkDestroyDynamicColorBlendState( VkDevice device, VkDynamicColorBlendState dynamicColorBlendState); @@ -2704,7 +2704,7 @@ VkResult VKAPI vkCreateDynamicDepthStencilState( const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, VkDynamicDepthStencilState* pState); -VkResult VKAPI vkDestroyDynamicDepthStencilState( +void VKAPI vkDestroyDynamicDepthStencilState( VkDevice device, VkDynamicDepthStencilState dynamicDepthStencilState); @@ -2713,7 +2713,7 @@ VkResult VKAPI vkCreateFramebuffer( const VkFramebufferCreateInfo* pCreateInfo, VkFramebuffer* pFramebuffer); -VkResult VKAPI vkDestroyFramebuffer( +void VKAPI vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer); @@ -2722,7 +2722,7 @@ VkResult VKAPI vkCreateRenderPass( const VkRenderPassCreateInfo* pCreateInfo, VkRenderPass* pRenderPass); -VkResult VKAPI vkDestroyRenderPass( +void VKAPI vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass); @@ -2736,7 +2736,7 @@ VkResult VKAPI vkCreateCommandPool( const VkCmdPoolCreateInfo* pCreateInfo, VkCmdPool* pCmdPool); -VkResult VKAPI vkDestroyCommandPool( +void VKAPI vkDestroyCommandPool( VkDevice device, VkCmdPool cmdPool); @@ -2750,7 +2750,7 @@ VkResult VKAPI vkCreateCommandBuffer( const VkCmdBufferCreateInfo* pCreateInfo, VkCmdBuffer* pCmdBuffer); -VkResult VKAPI vkDestroyCommandBuffer( +void VKAPI vkDestroyCommandBuffer( VkDevice device, VkCmdBuffer commandBuffer); diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index eb70abfeb76..64f10ffe74e 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -144,7 +144,7 @@ VkResult anv_CreateCommandBuffer( return result; } -VkResult anv_DestroyCommandBuffer( +void anv_DestroyCommandBuffer( VkDevice _device, VkCmdBuffer _cmd_buffer) { @@ -158,8 +158,6 @@ VkResult anv_DestroyCommandBuffer( anv_state_stream_finish(&cmd_buffer->surface_state_stream); anv_state_stream_finish(&cmd_buffer->dynamic_state_stream); anv_device_free(device, cmd_buffer); - - return VK_SUCCESS; } VkResult anv_ResetCommandBuffer( @@ -786,7 +784,7 @@ VkResult anv_CreateCommandPool( return VK_SUCCESS; } -VkResult anv_DestroyCommandPool( +void anv_DestroyCommandPool( VkDevice _device, VkCmdPool cmdPool) { @@ -796,8 +794,6 @@ VkResult anv_DestroyCommandPool( anv_ResetCommandPool(_device, cmdPool, 0); anv_device_free(device, pool); - - return VK_SUCCESS; } VkResult anv_ResetCommandPool( diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index fdc6f8e1034..dd8e3ffa0af 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -178,7 +178,7 @@ VkResult anv_CreateInstance( return VK_SUCCESS; } -VkResult anv_DestroyInstance( +void anv_DestroyInstance( VkInstance _instance) { ANV_FROM_HANDLE(anv_instance, instance, _instance); @@ -190,8 +190,6 @@ VkResult anv_DestroyInstance( _mesa_locale_fini(); instance->pfnFree(instance->pAllocUserData, instance); - - return VK_SUCCESS; } void * @@ -650,7 +648,7 @@ VkResult anv_CreateDevice( return vk_error(VK_ERROR_UNAVAILABLE); } -VkResult anv_DestroyDevice( +void anv_DestroyDevice( VkDevice _device) { ANV_FROM_HANDLE(anv_device, device, _device); @@ -679,8 +677,6 @@ VkResult anv_DestroyDevice( close(device->fd); anv_instance_free(device->instance, device); - - return VK_SUCCESS; } VkResult anv_GetGlobalExtensionProperties( @@ -937,7 +933,7 @@ VkResult anv_AllocMemory( return result; } -VkResult anv_FreeMemory( +void anv_FreeMemory( VkDevice _device, VkDeviceMemory _mem) { @@ -951,8 +947,6 @@ VkResult anv_FreeMemory( anv_gem_close(device, mem->bo.gem_handle); anv_device_free(device, mem); - - return VK_SUCCESS; } VkResult anv_MapMemory( @@ -980,15 +974,13 @@ VkResult anv_MapMemory( return VK_SUCCESS; } -VkResult anv_UnmapMemory( +void anv_UnmapMemory( VkDevice _device, VkDeviceMemory _mem) { ANV_FROM_HANDLE(anv_device_memory, mem, _mem); anv_gem_munmap(mem->map, mem->map_size); - - return VK_SUCCESS; } VkResult anv_FlushMappedMemoryRanges( @@ -1195,7 +1187,7 @@ VkResult anv_CreateFence( return result; } -VkResult anv_DestroyFence( +void anv_DestroyFence( VkDevice _device, VkFence _fence) { @@ -1205,8 +1197,6 @@ VkResult anv_DestroyFence( anv_gem_munmap(fence->bo.map, fence->bo.size); anv_gem_close(device, fence->bo.gem_handle); anv_device_free(device, fence); - - return VK_SUCCESS; } VkResult anv_ResetFences( @@ -1278,11 +1268,11 @@ VkResult anv_CreateSemaphore( stub_return(VK_UNSUPPORTED); } -VkResult anv_DestroySemaphore( +void anv_DestroySemaphore( VkDevice device, VkSemaphore semaphore) { - stub_return(VK_UNSUPPORTED); + stub(); } VkResult anv_QueueSignalSemaphore( @@ -1309,11 +1299,11 @@ VkResult anv_CreateEvent( stub_return(VK_UNSUPPORTED); } -VkResult anv_DestroyEvent( +void anv_DestroyEvent( VkDevice device, VkEvent event) { - stub_return(VK_UNSUPPORTED); + stub(); } VkResult anv_GetEventStatus( @@ -1363,7 +1353,7 @@ VkResult anv_CreateBuffer( return VK_SUCCESS; } -VkResult anv_DestroyBuffer( +void anv_DestroyBuffer( VkDevice _device, VkBuffer _buffer) { @@ -1371,8 +1361,6 @@ VkResult anv_DestroyBuffer( ANV_FROM_HANDLE(anv_buffer, buffer, _buffer); anv_device_free(device, buffer); - - return VK_SUCCESS; } void @@ -1421,7 +1409,7 @@ anv_buffer_view_create( return VK_SUCCESS; } -VkResult anv_DestroyBufferView( +void anv_DestroyBufferView( VkDevice _device, VkBufferView _bview) { @@ -1430,11 +1418,9 @@ VkResult anv_DestroyBufferView( anv_state_pool_free(&device->surface_state_pool, bview->surface_state); anv_device_free(device, bview); - - return VK_SUCCESS; } -VkResult anv_DestroySampler( +void anv_DestroySampler( VkDevice _device, VkSampler _sampler) { @@ -1442,8 +1428,6 @@ VkResult anv_DestroySampler( ANV_FROM_HANDLE(anv_sampler, sampler, _sampler); anv_device_free(device, sampler); - - return VK_SUCCESS; } // Descriptor set functions @@ -1601,7 +1585,7 @@ VkResult anv_CreateDescriptorSetLayout( return VK_SUCCESS; } -VkResult anv_DestroyDescriptorSetLayout( +void anv_DestroyDescriptorSetLayout( VkDevice _device, VkDescriptorSetLayout _set_layout) { @@ -1609,8 +1593,6 @@ VkResult anv_DestroyDescriptorSetLayout( ANV_FROM_HANDLE(anv_descriptor_set_layout, set_layout, _set_layout); anv_device_free(device, set_layout); - - return VK_SUCCESS; } VkResult anv_CreateDescriptorPool( @@ -1625,12 +1607,11 @@ VkResult anv_CreateDescriptorPool( return VK_SUCCESS; } -VkResult anv_DestroyDescriptorPool( +void anv_DestroyDescriptorPool( VkDevice _device, VkDescriptorPool _pool) { anv_finishme("VkDescriptorPool is a stub: free the pool's descriptor sets"); - return VK_SUCCESS; } VkResult anv_ResetDescriptorPool( @@ -1901,7 +1882,7 @@ VkResult anv_CreateDynamicViewportState( return VK_SUCCESS; } -VkResult anv_DestroyDynamicViewportState( +void anv_DestroyDynamicViewportState( VkDevice _device, VkDynamicViewportState _vp_state) { @@ -1913,11 +1894,9 @@ VkResult anv_DestroyDynamicViewportState( anv_state_pool_free(&device->dynamic_state_pool, vp_state->scissor); anv_device_free(device, vp_state); - - return VK_SUCCESS; } -VkResult anv_DestroyDynamicRasterState( +void anv_DestroyDynamicRasterState( VkDevice _device, VkDynamicRasterState _rs_state) { @@ -1925,8 +1904,6 @@ VkResult anv_DestroyDynamicRasterState( ANV_FROM_HANDLE(anv_dynamic_rs_state, rs_state, _rs_state); anv_device_free(device, rs_state); - - return VK_SUCCESS; } VkResult anv_CreateDynamicColorBlendState( @@ -1958,7 +1935,7 @@ VkResult anv_CreateDynamicColorBlendState( return VK_SUCCESS; } -VkResult anv_DestroyDynamicColorBlendState( +void anv_DestroyDynamicColorBlendState( VkDevice _device, VkDynamicColorBlendState _cb_state) { @@ -1966,11 +1943,9 @@ VkResult anv_DestroyDynamicColorBlendState( ANV_FROM_HANDLE(anv_dynamic_cb_state, cb_state, _cb_state); anv_device_free(device, cb_state); - - return VK_SUCCESS; } -VkResult anv_DestroyDynamicDepthStencilState( +void anv_DestroyDynamicDepthStencilState( VkDevice _device, VkDynamicDepthStencilState _ds_state) { @@ -1978,8 +1953,6 @@ VkResult anv_DestroyDynamicDepthStencilState( ANV_FROM_HANDLE(anv_dynamic_ds_state, ds_state, _ds_state); anv_device_free(device, ds_state); - - return VK_SUCCESS; } VkResult anv_CreateFramebuffer( @@ -2037,7 +2010,7 @@ VkResult anv_CreateFramebuffer( return VK_SUCCESS; } -VkResult anv_DestroyFramebuffer( +void anv_DestroyFramebuffer( VkDevice _device, VkFramebuffer _fb) { @@ -2047,8 +2020,6 @@ VkResult anv_DestroyFramebuffer( anv_DestroyDynamicViewportState(anv_device_to_handle(device), fb->vp_state); anv_device_free(device, fb); - - return VK_SUCCESS; } VkResult anv_CreateRenderPass( @@ -2151,7 +2122,7 @@ VkResult anv_CreateRenderPass( return VK_SUCCESS; } -VkResult anv_DestroyRenderPass( +void anv_DestroyRenderPass( VkDevice _device, VkRenderPass _pass) { @@ -2170,8 +2141,6 @@ VkResult anv_DestroyRenderPass( } anv_device_free(device, pass); - - return VK_SUCCESS; } VkResult anv_GetRenderAreaGranularity( diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index f926cc2b1c0..f0d099e0f25 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -353,14 +353,12 @@ anv_CreateImage(VkDevice device, pImage); } -VkResult +void anv_DestroyImage(VkDevice _device, VkImage _image) { ANV_FROM_HANDLE(anv_device, device, _device); anv_device_free(device, anv_image_from_handle(_image)); - - return VK_SUCCESS; } VkResult anv_GetImageSubresourceLayout( @@ -499,7 +497,7 @@ anv_image_view_fini(struct anv_device *device, anv_state_pool_free(&device->surface_state_pool, iview->surface_state); } -VkResult +void anv_DestroyImageView(VkDevice _device, VkImageView _iview) { ANV_FROM_HANDLE(anv_device, device, _device); @@ -507,8 +505,6 @@ anv_DestroyImageView(VkDevice _device, VkImageView _iview) anv_image_view_fini(device, iview); anv_device_free(device, iview); - - return VK_SUCCESS; } static void @@ -624,7 +620,7 @@ anv_CreateAttachmentView(VkDevice _device, return VK_SUCCESS; } -VkResult +void anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _aview) { ANV_FROM_HANDLE(anv_device, device, _device); @@ -635,6 +631,4 @@ anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _aview) } anv_device_free(device, aview); - - return VK_SUCCESS; } diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c index daf520f9714..4af4b663c87 100644 --- a/src/vulkan/anv_pipeline.c +++ b/src/vulkan/anv_pipeline.c @@ -56,7 +56,7 @@ VkResult anv_CreateShaderModule( return VK_SUCCESS; } -VkResult anv_DestroyShaderModule( +void anv_DestroyShaderModule( VkDevice _device, VkShaderModule _module) { @@ -64,8 +64,6 @@ VkResult anv_DestroyShaderModule( ANV_FROM_HANDLE(anv_shader_module, module, _module); anv_device_free(device, module); - - return VK_SUCCESS; } VkResult anv_CreateShader( @@ -100,7 +98,7 @@ VkResult anv_CreateShader( return VK_SUCCESS; } -VkResult anv_DestroyShader( +void anv_DestroyShader( VkDevice _device, VkShader _shader) { @@ -108,8 +106,6 @@ VkResult anv_DestroyShader( ANV_FROM_HANDLE(anv_shader, shader, _shader); anv_device_free(device, shader); - - return VK_SUCCESS; } @@ -123,12 +119,10 @@ VkResult anv_CreatePipelineCache( stub_return(VK_SUCCESS); } -VkResult anv_DestroyPipelineCache( +void anv_DestroyPipelineCache( VkDevice _device, VkPipelineCache _cache) { - /* VkPipelineCache is a dummy object. */ - return VK_SUCCESS; } size_t anv_GetPipelineCacheSize( @@ -155,7 +149,7 @@ VkResult anv_MergePipelineCaches( stub_return(VK_UNSUPPORTED); } -VkResult anv_DestroyPipeline( +void anv_DestroyPipeline( VkDevice _device, VkPipeline _pipeline) { @@ -167,8 +161,6 @@ VkResult anv_DestroyPipeline( anv_state_stream_finish(&pipeline->program_stream); anv_state_pool_free(&device->dynamic_state_pool, pipeline->blend_state); anv_device_free(pipeline->device, pipeline); - - return VK_SUCCESS; } static const uint32_t vk_to_gen_primitive_type[] = { @@ -418,7 +410,7 @@ VkResult anv_CreatePipelineLayout( return VK_SUCCESS; } -VkResult anv_DestroyPipelineLayout( +void anv_DestroyPipelineLayout( VkDevice _device, VkPipelineLayout _pipelineLayout) { @@ -426,6 +418,4 @@ VkResult anv_DestroyPipelineLayout( ANV_FROM_HANDLE(anv_pipeline_layout, pipeline_layout, _pipelineLayout); anv_device_free(device, pipeline_layout); - - return VK_SUCCESS; } diff --git a/src/vulkan/anv_query.c b/src/vulkan/anv_query.c index 4ef9d8c4b0c..9464531b8c5 100644 --- a/src/vulkan/anv_query.c +++ b/src/vulkan/anv_query.c @@ -72,7 +72,7 @@ VkResult anv_CreateQueryPool( return result; } -VkResult anv_DestroyQueryPool( +void anv_DestroyQueryPool( VkDevice _device, VkQueryPool _pool) { @@ -82,8 +82,6 @@ VkResult anv_DestroyQueryPool( anv_gem_munmap(pool->bo.map, pool->bo.size); anv_gem_close(device, pool->bo.gem_handle); anv_device_free(device, pool); - - return VK_SUCCESS; } VkResult anv_GetQueryPoolResults( -- 2.30.2