From 757bb2bad7f097bab124deb9bb5fe5a6d54fb7d5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 27 Feb 2018 10:14:53 +0100 Subject: [PATCH] [dxvk] Mark events and queries as available by default Fixes a lockup in World of Warships, which waits for an event query to be signaled without actually ever calling End() for that query. --- src/d3d11/d3d11_query.cpp | 1 + src/dxvk/dxvk_event.h | 2 +- src/dxvk/dxvk_query.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_query.cpp b/src/d3d11/d3d11_query.cpp index 998311ecf..abd99e261 100644 --- a/src/d3d11/d3d11_query.cpp +++ b/src/d3d11/d3d11_query.cpp @@ -170,6 +170,7 @@ namespace dxvk { UINT GetDataFlags) { if (m_desc.Query == D3D11_QUERY_EVENT) { const bool signaled = m_event->getStatus() == DxvkEventStatus::Signaled; + if (pData != nullptr) *static_cast(pData) = signaled; diff --git a/src/dxvk/dxvk_event.h b/src/dxvk/dxvk_event.h index 325e1cea8..643a06d66 100644 --- a/src/dxvk/dxvk_event.h +++ b/src/dxvk/dxvk_event.h @@ -50,7 +50,7 @@ namespace dxvk { std::mutex m_mutex; - DxvkEventStatus m_status = DxvkEventStatus::Reset; + DxvkEventStatus m_status = DxvkEventStatus::Signaled; uint32_t m_revision = 0; }; diff --git a/src/dxvk/dxvk_query.h b/src/dxvk/dxvk_query.h index bf4fc410e..591844e0d 100644 --- a/src/dxvk/dxvk_query.h +++ b/src/dxvk/dxvk_query.h @@ -190,7 +190,7 @@ namespace dxvk { std::mutex m_mutex; - DxvkQueryStatus m_status = DxvkQueryStatus::Reset; + DxvkQueryStatus m_status = DxvkQueryStatus::Available; DxvkQueryData m_data = {}; DxvkQueryHandle m_handle;