mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-29 17:52:18 +01:00
[d3d11] Introduce d3d11.ignoreGraphicsBarriers option
This commit is contained in:
parent
5109000747
commit
67391a7bb0
10
dxvk.conf
10
dxvk.conf
@ -158,6 +158,16 @@
|
||||
# d3d11.relaxedBarriers = False
|
||||
|
||||
|
||||
# Ignores barriers around UAV writes from fragment shaders.
|
||||
#
|
||||
# This may improve performance in some games, but may also introduce
|
||||
# rendering issues. Please don't report bugs with the option enabled.
|
||||
#
|
||||
# Supported values: True, False
|
||||
|
||||
# d3d11.ignoreGraphicsBarriers = False
|
||||
|
||||
|
||||
# Overrides anisotropic filtering for all samplers. Set this to a positive
|
||||
# value to enable AF for all samplers in the game, or to 0 in order to
|
||||
# disable AF entirely. Negative values will have no effect.
|
||||
|
@ -128,7 +128,10 @@ namespace dxvk {
|
||||
|
||||
if (ControlFlags & D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE)
|
||||
flags.set(DxvkBarrierControl::IgnoreWriteAfterWrite);
|
||||
|
||||
|
||||
if (ControlFlags & D3D11_VK_BARRIER_CONTROL_IGNORE_GRAPHICS_UAV)
|
||||
flags.set(DxvkBarrierControl::IgnoreGraphicsBarriers);
|
||||
|
||||
m_ctx->EmitCs([cFlags = flags] (DxvkContext* ctx) {
|
||||
ctx->setBarrierControl(cFlags);
|
||||
});
|
||||
|
@ -16,13 +16,21 @@ namespace dxvk {
|
||||
m_csThread(Device->createContext()),
|
||||
m_videoContext(this, Device) {
|
||||
EmitCs([
|
||||
cDevice = m_device,
|
||||
cRelaxedBarriers = pParent->GetOptions()->relaxedBarriers
|
||||
cDevice = m_device,
|
||||
cRelaxedBarriers = pParent->GetOptions()->relaxedBarriers,
|
||||
cIgnoreGraphicsBarriers = pParent->GetOptions()->ignoreGraphicsBarriers
|
||||
] (DxvkContext* ctx) {
|
||||
ctx->beginRecording(cDevice->createCommandList());
|
||||
|
||||
DxvkBarrierControlFlags barrierControl;
|
||||
|
||||
if (cRelaxedBarriers)
|
||||
ctx->setBarrierControl(DxvkBarrierControl::IgnoreWriteAfterWrite);
|
||||
barrierControl.set(DxvkBarrierControl::IgnoreWriteAfterWrite);
|
||||
|
||||
if (cIgnoreGraphicsBarriers)
|
||||
barrierControl.set(DxvkBarrierControl::IgnoreGraphicsBarriers);
|
||||
|
||||
ctx->setBarrierControl(barrierControl);
|
||||
});
|
||||
|
||||
ClearState();
|
||||
|
@ -22,6 +22,7 @@ enum D3D11_VK_EXTENSION : uint32_t {
|
||||
*/
|
||||
enum D3D11_VK_BARRIER_CONTROL : uint32_t {
|
||||
D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE = 1 << 0,
|
||||
D3D11_VK_BARRIER_CONTROL_IGNORE_GRAPHICS_UAV = 1 << 1,
|
||||
};
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ namespace dxvk {
|
||||
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
||||
this->forceTgsmBarriers = config.getOption<bool>("d3d11.forceTgsmBarriers", false);
|
||||
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
||||
this->ignoreGraphicsBarriers = config.getOption<bool>("d3d11.ignoreGraphicsBarriers", 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", true);
|
||||
|
@ -48,6 +48,12 @@ namespace dxvk {
|
||||
/// but might also cause rendering issues.
|
||||
bool relaxedBarriers;
|
||||
|
||||
/// Ignore graphics barriers
|
||||
///
|
||||
/// May improve performance in some games,
|
||||
/// but might also cause rendering issues.
|
||||
bool ignoreGraphicsBarriers;
|
||||
|
||||
/// Maximum tessellation factor.
|
||||
///
|
||||
/// Limits tessellation factors in tessellation
|
||||
|
Loading…
x
Reference in New Issue
Block a user