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"
|
|
|
|
|
2018-03-24 17:29:13 +01:00
|
|
|
#include "d3d11_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
2018-08-07 14:58:08 +02:00
|
|
|
struct D3D11Options {
|
|
|
|
D3D11Options(const Config& config);
|
|
|
|
/// Handle D3D11_MAP_FLAG_DO_NOT_WAIT properly.
|
|
|
|
///
|
|
|
|
/// This can offer substantial speedups, but some games
|
|
|
|
/// (The Witcher 3, Elder Scrolls Online, possibly others)
|
|
|
|
/// seem to make incorrect assumptions about when a map
|
|
|
|
/// operation succeeds when that flag is set.
|
|
|
|
bool allowMapFlagNoWait;
|
|
|
|
|
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-02-05 19:58:46 +01:00
|
|
|
/// Enables sm4-compliant division-by-zero behaviour
|
|
|
|
/// Windows drivers don't normally do this, but some
|
|
|
|
/// games may expect correct behaviour.
|
|
|
|
bool strictDivision;
|
|
|
|
|
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;
|
|
|
|
|
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
|
|
|
|
|
|
|
/// 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;
|
|
|
|
|
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;
|
2018-03-24 17:29:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|