win-capture: Improve Vulkan hook stability

Make fixes mostly to stabilize CTS. Tested on Windows with RTX 2080 Ti.

Use separate linked-list maps for devices and queues.

Process queues upfront in OBS_CreateDevice, and not lazily in
OBS_GetDeviceQueue.

Handle failed node allocation for OBS_CreateInstance, OBS_CreateDevice,
and OBS_CreateSwapchainKHR.

Handle VK_NULL_HANDLE for OBS_DestroySurfaceKHR and
OBS_DestroySwapchainKHR.

Add temporary code path CTS_WORKAROUND to deal with CTS sharing surfaces
between instances.

Fix return value for OBS_DestroyInstance.

Add missing _freea calls, required for _malloca.

Make sure the queue passed to OBS_QueuePresentKHR supports transfer to
safely call vkCmdCopyImage.

Update GetInstanceProcAddr/GetDeviceProcAddr to conform closer to spec.

Remove extra macros because I dislike indirection more than verbosity.
This commit is contained in:
jpark37 2020-07-24 09:30:05 -07:00
parent 63373a8fd7
commit 44fb61b1f2
2 changed files with 373 additions and 196 deletions

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@ struct vk_inst_funcs {
DEF_FUNC(DestroyInstance);
DEF_FUNC(CreateWin32SurfaceKHR);
DEF_FUNC(DestroySurfaceKHR);
DEF_FUNC(GetPhysicalDeviceQueueFamilyProperties);
DEF_FUNC(GetPhysicalDeviceMemoryProperties);
DEF_FUNC(GetPhysicalDeviceImageFormatProperties2);
DEF_FUNC(EnumerateDeviceExtensionProperties);