[dxvk] Removed unused DxvkOptions

This commit is contained in:
Philip Rebohle 2018-04-11 13:06:43 +02:00
parent 8ea17e7a25
commit 4797645bd2
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
5 changed files with 11 additions and 133 deletions

View File

@ -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);

View File

@ -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<DxvkPipelineCache> m_pipelineCache;
DxvkUnboundResources m_unboundResources;
DxvkOptions m_options;
sync::Spinlock m_statLock;
DxvkStatCounters m_statCounters;

View File

@ -1,37 +0,0 @@
#include <unordered_map>
#include "dxvk_options.h"
namespace dxvk {
const static std::unordered_map<std::string, DxvkOptionSet> 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<DxvkAdapter>& 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));
}
}

View File

@ -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<DxvkOption>;
/**
* \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<DxvkAdapter>& 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;
};
}

View File

@ -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 ],