2018-03-24 18:54:00 +01:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2018-03-24 17:29:13 +01:00
|
|
|
#include "d3d11_options.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2018-08-07 14:58:08 +02:00
|
|
|
D3D11Options::D3D11Options(const Config& config) {
|
2019-09-19 20:51:05 +02:00
|
|
|
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", true);
|
2019-01-14 18:28:53 +01:00
|
|
|
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
2019-04-05 20:24:08 +02:00
|
|
|
this->strictDivision = config.getOption<bool>("d3d11.strictDivision", false);
|
|
|
|
this->constantBufferRangeCheck = config.getOption<bool>("d3d11.constantBufferRangeCheck", false);
|
|
|
|
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
2019-02-07 00:57:21 +01:00
|
|
|
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
2019-01-14 18:28:53 +01:00
|
|
|
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
|
|
|
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
|
|
|
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
|
2018-10-22 22:41:54 +02:00
|
|
|
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
2019-01-14 18:28:53 +01:00
|
|
|
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
2018-10-22 22:41:54 +02:00
|
|
|
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
2019-10-26 22:56:47 +02:00
|
|
|
|
|
|
|
bool apitraceAttached = false;
|
|
|
|
#ifndef __WINE__
|
|
|
|
apitraceAttached = ::GetModuleHandle("dxgitrace.dll") != nullptr;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
this->apitraceMode = config.getOption<bool>("d3d11.apitraceMode", apitraceAttached);
|
|
|
|
|
|
|
|
// Inform user in case they have the option enabled or a game
|
|
|
|
// ships a file called dxgitrace.dll for whatever reason.
|
|
|
|
if (this->apitraceMode)
|
|
|
|
Logger::warn("D3D11: Apitrace mode enabled, may affect performance!");
|
2018-03-24 17:29:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|