if ((*ii).second->graphicsPipelineCI.stageCount != 0) {
delete[] (*ii).second->graphicsPipelineCI.pStages;
}
- if ((*ii).second->pVertexBindingDescriptions) {
- delete[] (*ii).second->pVertexBindingDescriptions;
- }
- if ((*ii).second->pVertexAttributeDescriptions) {
- delete[] (*ii).second->pVertexAttributeDescriptions;
- }
- if ((*ii).second->pAttachments) {
- delete[] (*ii).second->pAttachments;
- }
+ delete[] (*ii).second->pVertexBindingDescriptions;
+ delete[] (*ii).second->pVertexAttributeDescriptions;
+ delete[] (*ii).second->pAttachments;
if ((*ii).second->dynStateCI.dynamicStateCount != 0) {
delete[] (*ii).second->dynStateCI.pDynamicStates;
}
// Freeing layouts handled in deleteLayouts() function
// Free Update shadow struct tree
freeShadowUpdateTree(pFreeSet);
- if (pFreeSet->ppDescriptors) {
- delete[] pFreeSet->ppDescriptors;
- }
+ delete[] pFreeSet->ppDescriptors;
delete pFreeSet;
}
delete (*ii).second;
LAYOUT_NODE* pLayout = (*ii).second;
if (pLayout->createInfo.pBindings) {
for (uint32_t i=0; i<pLayout->createInfo.bindingCount; i++) {
- if (pLayout->createInfo.pBindings[i].pImmutableSamplers)
- delete[] pLayout->createInfo.pBindings[i].pImmutableSamplers;
+ delete[] pLayout->createInfo.pBindings[i].pImmutableSamplers;
}
delete[] pLayout->createInfo.pBindings;
}
loader_platform_thread_unlock_mutex(&globalLock);
} else {
for (i=0; i<count; i++) {
- if (pPipeNode[i]) {
- // Clean up any locally allocated data structures
- delete pPipeNode[i];
- }
+ // Clean up any locally allocated data structures
+ delete pPipeNode[i];
}
loader_platform_thread_unlock_mutex(&globalLock);
return VK_ERROR_VALIDATION_FAILED_EXT;
return;
for (auto ii=my_data->renderPassMap.begin(); ii!=my_data->renderPassMap.end(); ++ii) {
const VkRenderPassCreateInfo* pRenderPassInfo = (*ii).second->pCreateInfo;
- if (pRenderPassInfo->pAttachments) {
- delete[] pRenderPassInfo->pAttachments;
- }
+ delete[] pRenderPassInfo->pAttachments;
if (pRenderPassInfo->pSubpasses) {
for (uint32_t i=0; i<pRenderPassInfo->subpassCount; ++i) {
// Attachements are all allocated in a block, so just need to
}
delete[] pRenderPassInfo->pSubpasses;
}
- if (pRenderPassInfo->pDependencies) {
- delete[] pRenderPassInfo->pDependencies;
- }
+ delete[] pRenderPassInfo->pDependencies;
delete pRenderPassInfo;
delete (*ii).second;
}
}
}
~_DESCRIPTOR_POOL_NODE() {
- if (createInfo.pPoolSizes) {
- delete[] createInfo.pPoolSizes;
- }
+ delete[] createInfo.pPoolSizes;
// TODO : pSets are currently freed in deletePools function which uses freeShadowUpdateTree function
// need to migrate that struct to smart ptrs for auto-cleanup
}
}
~_SWAPCHAIN_NODE()
{
- if (pQueueFamilyIndices)
- delete pQueueFamilyIndices;
+ delete pQueueFamilyIndices;
}
} SWAPCHAIN_NODE;
}
// CODEGEN : file /usr/local/google/home/tobine/vulkan_work/LoaderAndTools/vk-layer-generate.py line #1671
VkResult result = get_dispatch_table(unique_objects_device_table_map, device)->CreateComputePipelines(device, pipelineCache, createInfoCount, (const VkComputePipelineCreateInfo*)local_pCreateInfos, pAllocator, pPipelines);
- if (local_pCreateInfos)
- delete[] local_pCreateInfos;
+ delete[] local_pCreateInfos;
if (VK_SUCCESS == result) {
VkUniqueObject* pUO = NULL;
for (uint32_t i=0; i<createInfoCount; ++i) {
}
// CODEGEN : file /usr/local/google/home/tobine/vulkan_work/LoaderAndTools/vk-layer-generate.py line #1671
VkResult result = get_dispatch_table(unique_objects_device_table_map, device)->CreateGraphicsPipelines(device, pipelineCache, createInfoCount, (const VkGraphicsPipelineCreateInfo*)local_pCreateInfos, pAllocator, pPipelines);
- if (local_pCreateInfos)
- delete[] local_pCreateInfos;
+ delete[] local_pCreateInfos;
if (VK_SUCCESS == result) {
VkUniqueObject* pUO = NULL;
for (uint32_t i=0; i<createInfoCount; ++i) {