From 4797645bd26e64e8d830522ab140e427fc0b37ba Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 11 Apr 2018 13:06:43 +0200 Subject: [PATCH] [dxvk] Removed unused DxvkOptions --- src/dxvk/dxvk_device.cpp | 4 -- src/dxvk/dxvk_device.h | 12 ------ src/dxvk/dxvk_options.cpp | 37 ------------------- src/dxvk/dxvk_options.h | 77 --------------------------------------- src/dxvk/meson.build | 14 +++++-- 5 files changed, 11 insertions(+), 133 deletions(-) delete mode 100644 src/dxvk/dxvk_options.cpp delete mode 100644 src/dxvk/dxvk_options.h diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index db7f5c92..1ea4d01a 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -17,10 +17,6 @@ namespace dxvk { m_pipelineCache (new DxvkPipelineCache (vkd)), m_unboundResources(this), m_submissionQueue (this) { - m_options.adjustAppOptions(env::getExeName()); - m_options.adjustDeviceOptions(m_adapter); - m_options.logOptions(); - m_vkd->vkGetDeviceQueue(m_vkd->device(), m_adapter->graphicsQueueFamily(), 0, &m_graphicsQueue); diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index 6de8d169..7236abdb 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -9,7 +9,6 @@ #include "dxvk_framebuffer.h" #include "dxvk_image.h" #include "dxvk_memory.h" -#include "dxvk_options.h" #include "dxvk_pipecache.h" #include "dxvk_pipemanager.h" #include "dxvk_queue.h" @@ -77,16 +76,6 @@ namespace dxvk { return m_adapter; } - /** - * \brief Checks whether an option is enabled - * - * \param [in] option The option to check for - * \returns \c true if the option is enabled - */ - bool hasOption(DxvkOption option) const { - return m_options.test(option); - } - /** * \brief Enabled device extensions * \returns Enabled device extensions @@ -323,7 +312,6 @@ namespace dxvk { Rc m_pipelineCache; DxvkUnboundResources m_unboundResources; - DxvkOptions m_options; sync::Spinlock m_statLock; DxvkStatCounters m_statCounters; diff --git a/src/dxvk/dxvk_options.cpp b/src/dxvk/dxvk_options.cpp deleted file mode 100644 index 3b7ec62b..00000000 --- a/src/dxvk/dxvk_options.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include - -#include "dxvk_options.h" - -namespace dxvk { - - const static std::unordered_map g_appOptions = {{ - - }}; - - - void DxvkOptions::adjustAppOptions(const std::string& appName) { - auto appOptions = g_appOptions.find(appName); - - if (appOptions != g_appOptions.end()) - m_options.set(appOptions->second); - } - - - void DxvkOptions::adjustDeviceOptions(const Rc& adapter) { - - } - - - void DxvkOptions::logOptions() const { - - } - - - void DxvkOptions::logOption( - DxvkOption option, - const std::string& name) const { - if (m_options.test(option)) - Logger::info(str::format("Using option ", name)); - } - -} \ No newline at end of file diff --git a/src/dxvk/dxvk_options.h b/src/dxvk/dxvk_options.h deleted file mode 100644 index c544416d..00000000 --- a/src/dxvk/dxvk_options.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#include "dxvk_adapter.h" - -namespace dxvk { - - /** - * \brief App- and driver-specific options - */ - enum class DxvkOption : uint64_t { - - }; - - using DxvkOptionSet = Flags; - - - /** - * \brief Option collection - * - * Stores the options enabled for a given - * device when running a given application. - */ - class DxvkOptions { - - public: - - /** - * \brief Checks whether an option is enabled - * \returns \c true if the option is enabled - */ - bool test(DxvkOption opt) const { - return m_options.test(opt); - } - - /** - * \brief Sets app-specific options - * - * Application bugs and performance characteristics - * may require workarounds to be enabled, or allow - * for certain non-standard optimizations to be used. - * \param [in] appName Application name - * \returns Application options - */ - void adjustAppOptions( - const std::string& appName); - - /** - * \brief Adjusts options for a specific driver - * - * Driver bugs and performance characteristics may - * require some options to be enabled or disabled. - * \param [in] options Application options - * \param [in] adapter The adapter - * \returns Device options - */ - void adjustDeviceOptions( - const Rc& adapter); - - /** - * \brief Logs enabled options - * - * Informs the user about any options that - * are enabled. May help with debugging. - */ - void logOptions() const; - - private: - - DxvkOptionSet m_options = { 0ull }; - - void logOption( - DxvkOption option, - const std::string& name) const; - - }; - -} \ No newline at end of file diff --git a/src/dxvk/meson.build b/src/dxvk/meson.build index 5da6504e..db7305c4 100644 --- a/src/dxvk/meson.build +++ b/src/dxvk/meson.build @@ -1,4 +1,13 @@ -dxvk_hud_shaders = files([ +dxvk_shaders = files([ + 'shaders/dxvk_clear_buffer_u.comp', + 'shaders/dxvk_clear_buffer_f.comp', + 'shaders/dxvk_clear_image1d_u.comp', + 'shaders/dxvk_clear_image1d_f.comp', + 'shaders/dxvk_clear_image2d_u.comp', + 'shaders/dxvk_clear_image2d_f.comp', + 'shaders/dxvk_clear_image3d_u.comp', + 'shaders/dxvk_clear_image3d_f.comp', + 'hud/shaders/hud_text_frag.frag', 'hud/shaders/hud_text_vert.vert', ]) @@ -27,7 +36,6 @@ dxvk_src = files([ 'dxvk_main.cpp', 'dxvk_memory.cpp', 'dxvk_meta_resolve.cpp', - 'dxvk_options.cpp', 'dxvk_pipecache.cpp', 'dxvk_pipelayout.cpp', 'dxvk_pipemanager.cpp', @@ -62,7 +70,7 @@ dxvk_src = files([ thread_dep = dependency('threads') -dxvk_lib = static_library('dxvk', dxvk_src, glsl_generator.process(dxvk_hud_shaders), +dxvk_lib = static_library('dxvk', dxvk_src, glsl_generator.process(dxvk_shaders), link_with : [ util_lib, spirv_lib ], dependencies : [ thread_dep, lib_vulkan ], include_directories : [ dxvk_include_path ],