From 641b5240054c2a3378afa10509b4a694985d1450 Mon Sep 17 00:00:00 2001 From: Krzysztof Bogacki Date: Thu, 26 Dec 2024 20:37:41 +0100 Subject: [PATCH] fixup! nvapi: Introduce NvapiVulkanLowLatencyDevice Initialize static members out of line. --- src/nvapi/nvapi_vulkan_low_latency_device.cpp | 3 +++ src/nvapi/nvapi_vulkan_low_latency_device.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nvapi/nvapi_vulkan_low_latency_device.cpp b/src/nvapi/nvapi_vulkan_low_latency_device.cpp index c348781d..bbb41c1f 100644 --- a/src/nvapi/nvapi_vulkan_low_latency_device.cpp +++ b/src/nvapi/nvapi_vulkan_low_latency_device.cpp @@ -1,6 +1,9 @@ #include "./nvapi_vulkan_low_latency_device.h" namespace dxvk { + std::unordered_map NvapiVulkanLowLatencyDevice::m_lowLatencyDeviceMap = {}; + std::mutex NvapiVulkanLowLatencyDevice::m_lowLatencyDeviceMutex = {}; + std::pair NvapiVulkanLowLatencyDevice::GetOrCreate(VkDevice device, PFN_vkGetDeviceProcAddr pvkGetDeviceProcAddr) { std::scoped_lock lock{m_lowLatencyDeviceMutex}; diff --git a/src/nvapi/nvapi_vulkan_low_latency_device.h b/src/nvapi/nvapi_vulkan_low_latency_device.h index 0b64f7f4..5197a4a0 100644 --- a/src/nvapi/nvapi_vulkan_low_latency_device.h +++ b/src/nvapi/nvapi_vulkan_low_latency_device.h @@ -35,8 +35,8 @@ namespace dxvk { void QueueNotifyOutOfBand(VkQueue queue, VkOutOfBandQueueTypeNV queueType); private: - inline static std::unordered_map m_lowLatencyDeviceMap{}; - inline static std::mutex m_lowLatencyDeviceMutex{}; + static std::unordered_map m_lowLatencyDeviceMap; + static std::mutex m_lowLatencyDeviceMutex; VkDevice m_device{}; VkSemaphore m_semaphore{};