Make current frame as not started after vk init / shutdown.

The client might call into the renderer after it was shut down by
`VID_ShutdownRenderer()` or initialized `VID_LoadRenderer()`. This
is arguably a client bug, but hard to fix on client side and not
a problem for all other renderers. Work around it by marking the
current frame as 'not started' at Vulkan shutdown and init.
This commit is contained in:
Yamagi 2021-04-23 11:56:59 +02:00
parent a38084c621
commit 0ccf1e8ef8

View file

@ -1675,6 +1675,7 @@ void QVk_WaitAndShutdownAll (void)
Mesh_Free(); Mesh_Free();
QVk_Shutdown(); QVk_Shutdown();
vk_frameStarted = false;
vk_initialized = false; vk_initialized = false;
} }
@ -2052,6 +2053,7 @@ qboolean QVk_Init(void)
QVk_DebugSetObjectName((uint64_t)vk_colorbufferWarp.descriptorSet, QVk_DebugSetObjectName((uint64_t)vk_colorbufferWarp.descriptorSet,
VK_OBJECT_TYPE_DESCRIPTOR_SET, "Descriptor Set: Warp Postprocess Color Buffer"); VK_OBJECT_TYPE_DESCRIPTOR_SET, "Descriptor Set: Warp Postprocess Color Buffer");
vk_frameStarted = false;
vk_initialized = true; vk_initialized = true;
return true; return true;
} }