Jan Sikorski (@jsikorski) commented about dlls/dxgi/swapchain.c:
if (FAILED(hr = ID3D12Device_CreateFence(device, DXGI_MAX_SWAP_CHAIN_BUFFERS,
0, &IID_ID3D12Fence, (void **)&swapchain->frame_latency_fence)))
{
WARN("Failed to create frame latency fence, hr %#lx.\n", hr);
d3d12_swapchain_destroy(swapchain);
return hr;
}
if (!(swapchain->frame_latency_event = CreateEventW(NULL, FALSE, TRUE, NULL)))
{
hr = HRESULT_FROM_WIN32(GetLastError());
WARN("Failed to create frame latency event, hr %#lx.\n", hr);
d3d12_swapchain_destroy(swapchain);
return hr;
}
- if (!(swapchain->frame_latency_semaphore = CreateSemaphoreW(NULL, 1, LONG_MAX, NULL)))
Should we create the semaphore with initial count of `swapchain->frame_latency`?