Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HansKristian-Work/vkd3d-proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Kristian Arntzen <post@arntzen-software.no>2022-10-19 17:19:45 +0300
committerHans-Kristian Arntzen <post@arntzen-software.no>2022-11-11 18:49:31 +0300
commite00cf0ea2a6289c4a68c1e5edf6804826fee364d (patch)
treef58ca15ae5e74c059e4f564e9f303afc0099056a
parent62ad8e8570cb4db3dcfb51f69108c40712f1f0eb (diff)
vkd3d: Do not allow modification access on frame latency handles.
ReleaseSemaphore() is observed to fail on native. dwAccess is only SYNCHRONIZE. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
-rw-r--r--libs/vkd3d/swapchain_new.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/vkd3d/swapchain_new.c b/libs/vkd3d/swapchain_new.c
index f3232986..4604f464 100644
--- a/libs/vkd3d/swapchain_new.c
+++ b/libs/vkd3d/swapchain_new.c
@@ -360,9 +360,11 @@ static HANDLE STDMETHODCALLTYPE dxgi_vk_swap_chain_GetFrameLatencyEvent(IDXGIVkS
if (!swapchain->frame_latency_event)
return INVALID_HANDLE_VALUE;
+ /* Based on observation, this handle can be waited on, but ReleaseSemaphore() is not allowed.
+ * Verified that NtQueryObject returns 0x100000 access mask (SYNCHRONIZE only). */
if (!DuplicateHandle(GetCurrentProcess(), swapchain->frame_latency_event,
GetCurrentProcess(), &duplicated_handle,
- 0, FALSE, DUPLICATE_SAME_ACCESS))
+ SYNCHRONIZE, FALSE, 0))
{
ERR("Failed to duplicate waitable handle.\n");
return INVALID_HANDLE_VALUE;