From 99f6953e89c2143a61d8043b9eb9c971ddd5a74d Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 20 Nov 2018 15:50:01 +0100 Subject: [PATCH] [dxvk] Store DXVK options directly with the instance object --- src/dxvk/dxvk_device.cpp | 2 +- src/dxvk/dxvk_instance.cpp | 2 ++ src/dxvk/dxvk_instance.h | 11 ++++++++++- src/dxvk/dxvk_options.h | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index b64aec6c1..26b2c33f4 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -8,7 +8,7 @@ namespace dxvk { const Rc& vkd, const DxvkDeviceExtensions& extensions, const DxvkDeviceFeatures& features) - : m_options (adapter->instance()->config()), + : m_options (adapter->instance()->options()), m_adapter (adapter), m_vkd (vkd), m_extensions (extensions), diff --git a/src/dxvk/dxvk_instance.cpp b/src/dxvk/dxvk_instance.cpp index a12acb5b4..8a057457a 100644 --- a/src/dxvk/dxvk_instance.cpp +++ b/src/dxvk/dxvk_instance.cpp @@ -22,6 +22,8 @@ namespace dxvk { m_adapters = this->queryAdapters(); g_vrInstance.initDeviceExtensions(this); + + m_options = DxvkOptions(m_config); } diff --git a/src/dxvk/dxvk_instance.h b/src/dxvk/dxvk_instance.h index 1c84aa44d..200942cf3 100644 --- a/src/dxvk/dxvk_instance.h +++ b/src/dxvk/dxvk_instance.h @@ -58,10 +58,19 @@ namespace dxvk { const Config& config() const { return m_config; } + + /** + * \brief DXVK options + * \returns DXVK options + */ + const DxvkOptions& options() const { + return m_options; + } private: - Config m_config; + Config m_config; + DxvkOptions m_options; Rc m_vkl; Rc m_vki; diff --git a/src/dxvk/dxvk_options.h b/src/dxvk/dxvk_options.h index 93fb8ace7..3cdafe9e1 100644 --- a/src/dxvk/dxvk_options.h +++ b/src/dxvk/dxvk_options.h @@ -5,6 +5,7 @@ namespace dxvk { struct DxvkOptions { + DxvkOptions() { } DxvkOptions(const Config& config); /// Allow allocating more memory from