mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Move handling of constantBufferRangeCheck option to D3D11Options
This commit is contained in:
parent
9e084e63ca
commit
e95bc3256f
@ -38,7 +38,7 @@ namespace dxvk {
|
|||||||
m_dxvkDevice (pContainer->GetDXVKDevice()),
|
m_dxvkDevice (pContainer->GetDXVKDevice()),
|
||||||
m_dxvkAdapter (m_dxvkDevice->adapter()),
|
m_dxvkAdapter (m_dxvkDevice->adapter()),
|
||||||
m_d3d11Formats (m_dxvkAdapter),
|
m_d3d11Formats (m_dxvkAdapter),
|
||||||
m_d3d11Options (m_dxvkAdapter->instance()->config()),
|
m_d3d11Options (m_dxvkAdapter->instance()->config(), m_dxvkDevice),
|
||||||
m_dxbcOptions (m_dxvkDevice, m_d3d11Options) {
|
m_dxbcOptions (m_dxvkDevice, m_d3d11Options) {
|
||||||
m_initializer = new D3D11Initializer(this);
|
m_initializer = new D3D11Initializer(this);
|
||||||
m_context = new D3D11ImmediateContext(this, m_dxvkDevice);
|
m_context = new D3D11ImmediateContext(this, m_dxvkDevice);
|
||||||
|
@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
D3D11Options::D3D11Options(const Config& config) {
|
D3D11Options::D3D11Options(const Config& config, const Rc<DxvkDevice>& device) {
|
||||||
|
const DxvkDeviceInfo& devInfo = device->properties();
|
||||||
|
|
||||||
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", true);
|
this->allowMapFlagNoWait = config.getOption<bool>("d3d11.allowMapFlagNoWait", true);
|
||||||
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
this->dcSingleUseMode = config.getOption<bool>("d3d11.dcSingleUseMode", true);
|
||||||
this->strictDivision = config.getOption<bool>("d3d11.strictDivision", false);
|
this->strictDivision = config.getOption<bool>("d3d11.strictDivision", false);
|
||||||
this->constantBufferRangeCheck = config.getOption<bool>("d3d11.constantBufferRangeCheck", false);
|
|
||||||
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
||||||
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
||||||
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
||||||
@ -18,6 +19,9 @@ namespace dxvk {
|
|||||||
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
||||||
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
|
||||||
|
|
||||||
|
this->constantBufferRangeCheck = config.getOption<bool>("d3d11.constantBufferRangeCheck", false)
|
||||||
|
&& DxvkGpuVendor(devInfo.core.properties.vendorID) != DxvkGpuVendor::Amd;
|
||||||
|
|
||||||
bool apitraceAttached = false;
|
bool apitraceAttached = false;
|
||||||
#ifndef __WINE__
|
#ifndef __WINE__
|
||||||
apitraceAttached = ::GetModuleHandle("dxgitrace.dll") != nullptr;
|
apitraceAttached = ::GetModuleHandle("dxgitrace.dll") != nullptr;
|
||||||
|
@ -4,12 +4,14 @@
|
|||||||
|
|
||||||
#include "../dxgi/dxgi_options.h"
|
#include "../dxgi/dxgi_options.h"
|
||||||
|
|
||||||
|
#include "../dxvk/dxvk_device.h"
|
||||||
|
|
||||||
#include "d3d11_include.h"
|
#include "d3d11_include.h"
|
||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
struct D3D11Options {
|
struct D3D11Options {
|
||||||
D3D11Options(const Config& config);
|
D3D11Options(const Config& config, const Rc<DxvkDevice>& device);
|
||||||
/// Handle D3D11_MAP_FLAG_DO_NOT_WAIT properly.
|
/// Handle D3D11_MAP_FLAG_DO_NOT_WAIT properly.
|
||||||
///
|
///
|
||||||
/// This can offer substantial speedups, but some games
|
/// This can offer substantial speedups, but some games
|
||||||
|
@ -39,9 +39,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
strictDivision = options.strictDivision;
|
strictDivision = options.strictDivision;
|
||||||
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
||||||
|
dynamicIndexedConstantBufferAsSsbo = options.constantBufferRangeCheck;
|
||||||
if (DxvkGpuVendor(devInfo.core.properties.vendorID) != DxvkGpuVendor::Amd)
|
|
||||||
dynamicIndexedConstantBufferAsSsbo = options.constantBufferRangeCheck;
|
|
||||||
|
|
||||||
// Disable early discard on RADV (with LLVM) due to GPU hangs
|
// Disable early discard on RADV (with LLVM) due to GPU hangs
|
||||||
// Disable early discard on Nvidia because it may hurt performance
|
// Disable early discard on Nvidia because it may hurt performance
|
||||||
|
Loading…
x
Reference in New Issue
Block a user