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

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-07-16 22:15:34 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-07-16 22:16:16 +0300
commitc599f95e5d05ac6a60a092b5e3c1526210f2c8da (patch)
tree6bd32ad1626d3c46ed790113c3b3fcab21e7fc91
parent4893788d9b0919abab97ab261de78f63b9c7e6ca (diff)
[d3d11] Do not cache GetCurrentProcess result
This is just a constant.
-rw-r--r--src/d3d11/d3d11_swapchain.cpp8
-rw-r--r--src/d3d11/d3d11_swapchain.h2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/d3d11/d3d11_swapchain.cpp b/src/d3d11/d3d11_swapchain.cpp
index fdfc1de6..0e823f41 100644
--- a/src/d3d11/d3d11_swapchain.cpp
+++ b/src/d3d11/d3d11_swapchain.cpp
@@ -161,12 +161,10 @@ namespace dxvk {
HANDLE STDMETHODCALLTYPE D3D11SwapChain::GetFrameLatencyEvent() {
HANDLE result = nullptr;
+ HANDLE processHandle = GetCurrentProcess();
- if (!m_processHandle)
- m_processHandle = GetCurrentProcess();
-
- if (!DuplicateHandle(m_processHandle, m_frameLatencyEvent,
- m_processHandle, &result, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+ if (!DuplicateHandle(processHandle, m_frameLatencyEvent,
+ processHandle, &result, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
Logger::err("DxgiSwapChain::GetFrameLatencyWaitableObject: DuplicateHandle failed");
return nullptr;
}
diff --git a/src/d3d11/d3d11_swapchain.h b/src/d3d11/d3d11_swapchain.h
index 7467b85b..00073d76 100644
--- a/src/d3d11/d3d11_swapchain.h
+++ b/src/d3d11/d3d11_swapchain.h
@@ -122,8 +122,6 @@ namespace dxvk {
HANDLE m_frameLatencyEvent = nullptr;
Rc<sync::CallbackFence> m_frameLatencySignal;
- HANDLE m_processHandle = nullptr;
-
bool m_dirty = true;
VkColorSpaceKHR m_colorspace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;