mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[d3d11] Introduce d3d11.invariantPosition option
Apparently it's better to make app profiles than risk tanking performance for all applications. Invariance rules in D3D11 are undocumented so it's not clear what the correct solution is.
This commit is contained in:
parent
11f08c7dea
commit
9721938e57
@ -124,6 +124,15 @@
|
||||
# d3d9.samplerAnisotropy = -1
|
||||
|
||||
|
||||
# Declares vertex positions as invariant in order to solve
|
||||
# potential Z-fighting issues at a small performance cost.
|
||||
#
|
||||
# Supported values: True, False
|
||||
|
||||
# d3d11.invariantPosition = False
|
||||
# d3d9.invariantPosition = False
|
||||
|
||||
|
||||
# Replaces NaN outputs from fragment shaders with zeroes for floating
|
||||
# point render target. Used in some games to prevent artifacting.
|
||||
#
|
||||
|
@ -13,6 +13,7 @@ namespace dxvk {
|
||||
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
||||
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
||||
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
||||
this->invariantPosition = config.getOption<bool>("d3d11.invariantPosition", false);
|
||||
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
|
||||
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
|
||||
this->maxFrameLatency = config.getOption<int32_t>("dxgi.maxFrameLatency", 0);
|
||||
|
@ -54,6 +54,9 @@ namespace dxvk {
|
||||
/// given anisotropy value for all samplers.
|
||||
int32_t samplerAnisotropy;
|
||||
|
||||
/// Declare vertex positions in shaders as invariant
|
||||
bool invariantPosition;
|
||||
|
||||
/// Back buffer count for the Vulkan swap chain.
|
||||
/// Overrides DXGI_SWAP_CHAIN_DESC::BufferCount.
|
||||
int32_t numBackBuffers;
|
||||
|
@ -37,13 +37,10 @@ namespace dxvk {
|
||||
case Tristate::False: minSsboAlignment = ~0u; break;
|
||||
}
|
||||
|
||||
invariantPosition = options.invariantPosition;
|
||||
enableRtOutputNanFixup = options.enableRtOutputNanFixup;
|
||||
zeroInitWorkgroupMemory = options.zeroInitWorkgroupMemory;
|
||||
dynamicIndexedConstantBufferAsSsbo = options.constantBufferRangeCheck;
|
||||
|
||||
// Don't declare vertex positions as invariant on Nvidia since it
|
||||
// may break certain games, such as Shadow of the Tomb Raider.
|
||||
invariantPosition = !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
|
||||
|
||||
// Disable early discard on RADV (with LLVM) due to GPU hangs
|
||||
// Disable early discard on Nvidia because it may hurt performance
|
||||
|
Loading…
x
Reference in New Issue
Block a user