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 {
|
2022-02-28 22:44:10 +01:00
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
2022-09-09 13:59:58 +02:00
|
|
|
/// Force thread-group shared memory accesses to be volatile
|
2020-02-07 22:47:06 +01:00
|
|
|
///
|
|
|
|
/// Workaround for compute shaders that read and
|
|
|
|
/// write from the same shared memory location
|
|
|
|
/// without explicit synchronization.
|
2022-09-09 13:59:58 +02:00
|
|
|
bool forceVolatileTgsmAccess;
|
2020-02-07 22:47:06 +01:00
|
|
|
|
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;
|
|
|
|
|
2021-09-08 15:20:01 +02:00
|
|
|
/// Ignore graphics barriers
|
|
|
|
///
|
|
|
|
/// May improve performance in some games,
|
|
|
|
/// but might also cause rendering issues.
|
|
|
|
bool ignoreGraphicsBarriers;
|
|
|
|
|
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;
|
2022-08-01 12:08:11 +02:00
|
|
|
|
|
|
|
/// Mipmap LOD bias
|
|
|
|
///
|
|
|
|
/// Enforces the given LOD bias for all samplers.
|
|
|
|
float samplerLodBias;
|
|
|
|
|
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;
|
|
|
|
|
2021-06-09 03:46:12 +02:00
|
|
|
/// Limit frame rate
|
|
|
|
int32_t maxFrameRate;
|
|
|
|
|
2022-02-14 04:11:36 +01:00
|
|
|
/// Limit discardable resource size
|
|
|
|
VkDeviceSize maxImplicitDiscardSize;
|
|
|
|
|
2022-02-22 04:58:42 +01:00
|
|
|
/// Limit size of buffer-mapped images
|
|
|
|
VkDeviceSize maxDynamicImageBufferSize;
|
|
|
|
|
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
|
|
|
|
2021-07-02 04:39:26 +02:00
|
|
|
/// Forces the sample count of all textures to be 1, and
|
|
|
|
/// performs the required shader and resolve fixups.
|
|
|
|
bool disableMsaa;
|
|
|
|
|
2022-02-28 22:44:10 +01:00
|
|
|
/// Dynamic resources with the given bind flags will be allocated
|
|
|
|
/// in cached system memory. Enabled automatically when recording
|
|
|
|
/// an api trace.
|
|
|
|
uint32_t cachedDynamicResources;
|
2022-08-24 12:27:02 +02:00
|
|
|
|
|
|
|
/// Always lock immediate context on every API call. May be
|
|
|
|
/// useful for debugging purposes or when applications have
|
|
|
|
/// race conditions.
|
|
|
|
bool enableContextLock;
|
2018-03-24 17:29:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|