obs-studio/plugins/win-capture/graphics-hook
Seth Williams 16e3faf0d0 win-capture: Fix Vulkan race condition
This race condition is caused when one thread creates a swap chain,
which calls OBS_CreateSwapchainKHR, at the same time another thread
calls OBS_CreateImageView.

OBS_CreateSwapchainKHR allocates swap data, publishes this into the
data->swaps linked list, then initializes it. Meanwhile,
OBS_CreateImageView is iterating the swaps linked list, to see if the
image matches any swap chain images. Due to the order in
OBS_CreateSwapchainKHR, there's no guarantee this data is initialized
so it often ends up running out of bounds on the swap_images array.

The fix is simply to defer the swap data publish to after init.

(cherry picked from commit aa1f2dea84)
2023-11-08 22:35:58 -06:00
..
cmake cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
CMakeLists.txt cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
d3d8-capture.cpp cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
d3d9-capture.cpp libobs-d3d11,libobs-opengl,plugins: Remove unneeded cast in switches 2023-01-16 11:52:26 +01:00
d3d9-patches.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d10-capture.cpp graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
d3d11-capture.cpp graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
d3d12-capture.cpp graphics-hook: Print DXGI swap chain desc 2022-09-10 15:36:53 -07:00
dxgi-capture.cpp graphics-hook: Remove unused code 2022-09-10 15:36:53 -07:00
dxgi-helpers.hpp libobs-d3d11,libobs-opengl,plugins: Remove unneeded cast in switches 2023-01-16 11:52:26 +01:00
gl-capture.c Update copyrights/names 2023-05-20 01:31:18 -07:00
gl-decs.h Update copyrights/names 2023-05-20 01:31:18 -07:00
graphics-hook-config.h.in win-capture: Add Vulkan capture 2020-02-29 04:53:28 -08:00
graphics-hook.c cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
graphics-hook.h cmake: Add changes for CMake build framework 3.0 2023-06-29 10:11:32 -04:00
graphics-hook.rc Update copyrights/names 2023-05-20 01:31:18 -07:00
obs-vulkan32.json graphics-hook: Bump Vulkan version 2022-07-29 23:22:39 -07:00
obs-vulkan64.json graphics-hook: Bump Vulkan version 2022-07-29 23:22:39 -07:00
vulkan-capture.c win-capture: Fix Vulkan race condition 2023-11-08 22:35:58 -06:00
vulkan-capture.h graphics-hook: Handle VK_KHR_imageless_framebuffer 2023-03-24 15:17:43 -07:00