Programmer71 said:
Have you considered the fact that this could be a false positive ? when exactly do you release the vulkan instance ?
My whole main() is this:
INT APIENTRY wWinMain( HINSTANCE _hInstance, HINSTANCE /*_hPrevInstance*/, LPWSTR /*_lpwsCmdLine*/, INT /*_iCmdShow*/ ) {
/*ls::CWindow wWindow;
wWindow.CreateRenderWindow(
1280, 720,
false, 32,
L"L. Spiro Tech Demo" );*/
ls::CVulkanDevice::LSG_VULKAN_INIT viInit = { 0 };
viInit.hInst = _hInstance;
//viInit.hWnd = wWindow.GetWindow();
viInit.hWnd = NULL;
viInit.pcWindowName = "L. Spiro Tech";
viInit.ui32AppVersion = 1;
ls::CVulkanDevice::Init( viInit );
//INT iRet = wWindow.Run();
ls::CVulkanDevice::DestroyVulkan();
//return iRet;
return 0;
}
I removed the window code just to make it clear that there is literally nothing else happening besides creating the Vulkan instance and then destroying it.
bool CVulkanDevice::Init( const LSG_VULKAN_INIT &_viInit ) {
// Create the instance.
VkApplicationInfo aiAppInfo = {
VK_STRUCTURE_TYPE_APPLICATION_INFO, // sType
nullptr, // pNext
_viInit.pcWindowName, // pApplicationName
_viInit.ui32AppVersion, // applicationVersion
"L. Spiro Tech", // pEngineName
VK_MAKE_VERSION( 1, 0, 0 ), // engineVersion
VK_API_VERSION_1_2 // apiVersion
};
const char * pcExt[] = {
VK_KHR_SURFACE_EXTENSION_NAME,
VK_KHR_WIN32_SURFACE_EXTENSION_NAME,
};
VkInstanceCreateInfo iciInstInfo = {
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, // sType
nullptr, // pNext
0, // flags
&aiAppInfo, // pApplicationInfo
0, // enabledLayerCount
nullptr, // ppEnabledLayerNames
LS_ELEMENTS( pcExt ), // enabledExtensionCount
pcExt // ppEnabledExtensionNames
};
if ( PrintVulkanError( "CVulkanDevice::Init(): ", ::vkCreateInstance( &iciInstInfo, nullptr, &m_iInstance ) ) ) {
ResetInternal();
return false;
}
return true;
}
void CVulkanDevice::DestroyVulkan() {
ResetInternal();
}
void CVulkanDevice::ResetInternal() {
::vkDestroyInstance( m_iInstance, nullptr );
m_iInstance = nullptr;
}
So there is literally nothing but create-instance, destroy-instance.
I can find no indications through documentation that the single resource I create is being mismanaged, but I can’t accept this reporting as “normal” behavior.
What could be happening here?
L. Spiro