2018-03-24 17:29:13 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-08-07 14:58:08 +02:00
|
|
|
#include "../util/config/config.h"
|
|
|
|
|
2018-10-22 22:41:54 +02:00
|
|
|
#include "../dxgi/dxgi_options.h"
|
|
|
|
|
2019-10-30 10:57:36 +01:00
|
|
|
#include "../dxvk/dxvk_device.h"
|
|
|
|
|
2018-03-24 17:29:13 +01:00
|
|
|
#include "d3d11_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2018-08-07 14:58:08 +02:00
|
|
|
struct D3D11Options {
|
2019-10-30 10:57:36 +01:00
|
|
|
D3D11Options(const Config& config, const Rc<DxvkDevice>& device);
|
2018-08-07 14:58:08 +02:00
|
|
|
|
2018-10-09 16:29:50 +02:00
|
|
|
/// Enables speed hack for mapping on deferred contexts
|
|
|
|
///
|
|
|
|
/// This can substantially speed up some games, but may
|
|
|
|
/// cause issues if the game submits command lists more
|
|
|
|
/// than once.
|
2018-11-20 10:51:09 +01:00
|
|
|
bool dcSingleUseMode;
|
2018-10-09 16:29:50 +02:00
|
|
|
|
2019-11-30 17:01:44 +01:00
|
|
|
/// Enables workaround to replace NaN render target
|
|
|
|
/// outputs with zero
|
|
|
|
bool enableRtOutputNanFixup;
|
|
|
|
|
2019-04-05 20:24:08 +02:00
|
|
|
/// Enables out-of-bounds access check for constant
|
|
|
|
/// buffers. Workaround for a few broken games that
|
|
|
|
/// access random data inside their shaders.
|
|
|
|
bool constantBufferRangeCheck;
|
|
|
|
|
2018-11-23 16:11:46 +01:00
|
|
|
/// Zero-initialize workgroup memory
|
|
|
|
///
|
|
|
|
/// Workargound for games that don't initialize
|
|
|
|
/// TGSM in compute shaders before reading it.
|
|
|
|
bool zeroInitWorkgroupMemory;
|
|
|
|
|
2020-02-07 22:47:06 +01:00
|
|
|
/// Force thread-group shared memory barriers
|
|
|
|
///
|
|
|
|
/// Workaround for compute shaders that read and
|
|
|
|
/// write from the same shared memory location
|
|
|
|
/// without explicit synchronization.
|
|
|
|
bool forceTgsmBarriers;
|
|
|
|
|
2019-02-07 00:57:21 +01:00
|
|
|
/// Use relaxed memory barriers
|
|
|
|
///
|
|
|
|
/// May improve performance in some games,
|
|
|
|
/// but might also cause rendering issues.
|
|
|
|
bool relaxedBarriers;
|
|
|
|
|
2018-09-09 23:14:00 +02:00
|
|
|
/// Maximum tessellation factor.
|
|
|
|
///
|
|
|
|
/// Limits tessellation factors in tessellation
|
|
|
|
/// control shaders. Values from 8 to 64 are
|
|
|
|
/// supported, other values will be ignored.
|
|
|
|
int32_t maxTessFactor;
|
2018-09-10 15:42:55 +02:00
|
|
|
|
|
|
|
/// Anisotropic filter override
|
|
|
|
///
|
|
|
|
/// Enforces anisotropic filtering with the
|
|
|
|
/// given anisotropy value for all samplers.
|
|
|
|
int32_t samplerAnisotropy;
|
2018-10-22 22:41:54 +02:00
|
|
|
|
2020-01-23 01:28:19 +01:00
|
|
|
/// Declare vertex positions in shaders as invariant
|
|
|
|
bool invariantPosition;
|
|
|
|
|
2021-01-28 20:32:38 +01:00
|
|
|
/// Enable float control bits
|
|
|
|
bool floatControls;
|
|
|
|
|
2018-10-22 22:41:54 +02:00
|
|
|
/// Back buffer count for the Vulkan swap chain.
|
|
|
|
/// Overrides DXGI_SWAP_CHAIN_DESC::BufferCount.
|
|
|
|
int32_t numBackBuffers;
|
|
|
|
|
|
|
|
/// Sync interval. Overrides the value
|
|
|
|
/// passed to IDXGISwapChain::Present.
|
|
|
|
int32_t syncInterval;
|
|
|
|
|
2020-04-12 20:25:20 +02:00
|
|
|
/// Tear-free mode if vsync is disabled
|
2020-05-02 10:18:13 +02:00
|
|
|
/// Tearing mode if vsync is enabled
|
|
|
|
Tristate tearFree;
|
2020-04-12 20:25:20 +02:00
|
|
|
|
2019-01-14 18:28:53 +01:00
|
|
|
/// Override maximum frame latency if the app specifies
|
|
|
|
/// a higher value. May help with frame timing issues.
|
|
|
|
int32_t maxFrameLatency;
|
|
|
|
|
2018-10-22 22:41:54 +02:00
|
|
|
/// Defer surface creation until first present call. This
|
|
|
|
/// fixes issues with games that create multiple swap chains
|
|
|
|
/// for a single window that may interfere with each other.
|
|
|
|
bool deferSurfaceCreation;
|
2019-10-26 22:56:47 +02:00
|
|
|
|
|
|
|
/// Apitrace mode: Maps all buffers in cached memory.
|
|
|
|
/// Enabled automatically if dxgitrace.dll is attached.
|
|
|
|
bool apitraceMode;
|
2018-03-24 17:29:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|