mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-23 19:54:16 +01:00
[dxvk] Rename and repurpose ignoreGraphicsBarriers option
Less nuclear approach that hopefully works just as well in practice.
This commit is contained in:
parent
d24dba21ee
commit
ff2faa4b1b
@ -147,10 +147,7 @@ namespace dxvk {
|
|||||||
DxvkBarrierControlFlags flags = parent->GetOptionsBarrierControlFlags();
|
DxvkBarrierControlFlags flags = parent->GetOptionsBarrierControlFlags();
|
||||||
|
|
||||||
if (ControlFlags & D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE)
|
if (ControlFlags & D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE)
|
||||||
flags.set(DxvkBarrierControl::IgnoreWriteAfterWrite);
|
flags.set(DxvkBarrierControl::IgnoreComputeWriteAfterWrite, DxvkBarrierControl::IgnoreGraphicsWriteAfterWrite);
|
||||||
|
|
||||||
if (ControlFlags & D3D11_VK_BARRIER_CONTROL_IGNORE_GRAPHICS_UAV)
|
|
||||||
flags.set(DxvkBarrierControl::IgnoreGraphicsBarriers);
|
|
||||||
|
|
||||||
m_ctx->EmitCs([cFlags = flags] (DxvkContext* ctx) {
|
m_ctx->EmitCs([cFlags = flags] (DxvkContext* ctx) {
|
||||||
ctx->setBarrierControl(cFlags);
|
ctx->setBarrierControl(cFlags);
|
||||||
|
@ -475,10 +475,10 @@ namespace dxvk {
|
|||||||
DxvkBarrierControlFlags barrierControl;
|
DxvkBarrierControlFlags barrierControl;
|
||||||
|
|
||||||
if (m_d3d11Options.relaxedBarriers)
|
if (m_d3d11Options.relaxedBarriers)
|
||||||
barrierControl.set(DxvkBarrierControl::IgnoreWriteAfterWrite);
|
barrierControl.set(DxvkBarrierControl::IgnoreComputeWriteAfterWrite);
|
||||||
|
|
||||||
if (m_d3d11Options.ignoreGraphicsBarriers)
|
if (m_d3d11Options.relaxedBarriers || m_d3d11Options.relaxedGraphicsBarriers)
|
||||||
barrierControl.set(DxvkBarrierControl::IgnoreGraphicsBarriers);
|
barrierControl.set(DxvkBarrierControl::IgnoreGraphicsWriteAfterWrite);
|
||||||
|
|
||||||
return barrierControl;
|
return barrierControl;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,9 @@ enum D3D11_VK_EXTENSION : uint32_t {
|
|||||||
*/
|
*/
|
||||||
enum D3D11_VK_BARRIER_CONTROL : uint32_t {
|
enum D3D11_VK_BARRIER_CONTROL : uint32_t {
|
||||||
D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE = 1 << 0,
|
D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE = 1 << 0,
|
||||||
D3D11_VK_BARRIER_CONTROL_IGNORE_GRAPHICS_UAV = 1 << 1,
|
|
||||||
|
// Removed:
|
||||||
|
// D3D11_VK_BARRIER_CONTROL_IGNORE_GRAPHICS_UAV = 1 << 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ namespace dxvk {
|
|||||||
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
this->zeroInitWorkgroupMemory = config.getOption<bool>("d3d11.zeroInitWorkgroupMemory", false);
|
||||||
this->forceVolatileTgsmAccess = config.getOption<bool>("d3d11.forceVolatileTgsmAccess", false);
|
this->forceVolatileTgsmAccess = config.getOption<bool>("d3d11.forceVolatileTgsmAccess", false);
|
||||||
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
this->relaxedBarriers = config.getOption<bool>("d3d11.relaxedBarriers", false);
|
||||||
this->ignoreGraphicsBarriers = config.getOption<bool>("d3d11.ignoreGraphicsBarriers", false);
|
this->relaxedGraphicsBarriers = config.getOption<bool>("d3d11.relaxedGraphicsBarriers", false);
|
||||||
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
this->maxTessFactor = config.getOption<int32_t>("d3d11.maxTessFactor", 0);
|
||||||
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
this->samplerAnisotropy = config.getOption<int32_t>("d3d11.samplerAnisotropy", -1);
|
||||||
this->samplerLodBias = config.getOption<float>("d3d11.samplerLodBias", 0.0f);
|
this->samplerLodBias = config.getOption<float>("d3d11.samplerLodBias", 0.0f);
|
||||||
@ -61,4 +61,4 @@ namespace dxvk {
|
|||||||
this->shaderDumpPath = env::getEnvVar("DXVK_SHADER_DUMP_PATH");
|
this->shaderDumpPath = env::getEnvVar("DXVK_SHADER_DUMP_PATH");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ namespace dxvk {
|
|||||||
///
|
///
|
||||||
/// May improve performance in some games,
|
/// May improve performance in some games,
|
||||||
/// but might also cause rendering issues.
|
/// but might also cause rendering issues.
|
||||||
bool ignoreGraphicsBarriers = false;
|
bool relaxedGraphicsBarriers = false;
|
||||||
|
|
||||||
/// Maximum tessellation factor.
|
/// Maximum tessellation factor.
|
||||||
///
|
///
|
||||||
@ -114,4 +114,4 @@ namespace dxvk {
|
|||||||
std::string shaderDumpPath;
|
std::string shaderDumpPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6817,9 +6817,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
template<bool Indexed, bool Indirect>
|
template<bool Indexed, bool Indirect>
|
||||||
bool DxvkContext::checkGraphicsHazards() {
|
bool DxvkContext::checkGraphicsHazards() {
|
||||||
if (m_barrierControl.test(DxvkBarrierControl::IgnoreGraphicsBarriers))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Check shader resources on every draw to handle WAW hazards, and to make
|
// Check shader resources on every draw to handle WAW hazards, and to make
|
||||||
// sure that writes are handled properly. If the pipeline does not have any
|
// sure that writes are handled properly. If the pipeline does not have any
|
||||||
// storage descriptors, we only need to check dirty resources.
|
// storage descriptors, we only need to check dirty resources.
|
||||||
|
@ -1786,7 +1786,11 @@ namespace dxvk {
|
|||||||
|
|
||||||
template<VkPipelineBindPoint BindPoint>
|
template<VkPipelineBindPoint BindPoint>
|
||||||
bool canIgnoreWawHazards() {
|
bool canIgnoreWawHazards() {
|
||||||
if (!m_barrierControl.test(DxvkBarrierControl::IgnoreWriteAfterWrite))
|
constexpr auto controlFlag = BindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS
|
||||||
|
? DxvkBarrierControl::IgnoreGraphicsWriteAfterWrite
|
||||||
|
: DxvkBarrierControl::IgnoreComputeWriteAfterWrite;
|
||||||
|
|
||||||
|
if (!m_barrierControl.test(controlFlag))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (BindPoint == VK_PIPELINE_BIND_POINT_COMPUTE) {
|
if (BindPoint == VK_PIPELINE_BIND_POINT_COMPUTE) {
|
||||||
|
@ -86,8 +86,8 @@ namespace dxvk {
|
|||||||
* synchronize implicitly.
|
* synchronize implicitly.
|
||||||
*/
|
*/
|
||||||
enum class DxvkBarrierControl : uint32_t {
|
enum class DxvkBarrierControl : uint32_t {
|
||||||
IgnoreWriteAfterWrite = 1,
|
IgnoreComputeWriteAfterWrite = 0,
|
||||||
IgnoreGraphicsBarriers = 2,
|
IgnoreGraphicsWriteAfterWrite = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
using DxvkBarrierControlFlags = Flags<DxvkBarrierControl>;
|
using DxvkBarrierControlFlags = Flags<DxvkBarrierControl>;
|
||||||
|
@ -291,12 +291,11 @@ namespace dxvk {
|
|||||||
/* Final Fantasy XV: VXAO does thousands of *
|
/* Final Fantasy XV: VXAO does thousands of *
|
||||||
* draw calls with the same UAV bound */
|
* draw calls with the same UAV bound */
|
||||||
{ R"(\\ffxv_s\.exe$)", {{
|
{ R"(\\ffxv_s\.exe$)", {{
|
||||||
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
{ "d3d11.relaxedGraphicsBarriers", "True" },
|
||||||
}} },
|
}} },
|
||||||
/* God of War - relies on NVAPI/AMDAGS for *
|
/* God of War - relies on NVAPI/AMDAGS for *
|
||||||
* barrier stuff, needs nvapi for DLSS */
|
* barrier stuff, needs nvapi for DLSS */
|
||||||
{ R"(\\GoW\.exe$)", {{
|
{ R"(\\GoW\.exe$)", {{
|
||||||
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
|
||||||
{ "d3d11.relaxedBarriers", "True" },
|
{ "d3d11.relaxedBarriers", "True" },
|
||||||
{ "dxgi.hideNvidiaGpu", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
{ "dxgi.maxFrameLatency", "1" },
|
{ "dxgi.maxFrameLatency", "1" },
|
||||||
@ -334,7 +333,7 @@ namespace dxvk {
|
|||||||
* presumably for culling, which doesn't play *
|
* presumably for culling, which doesn't play *
|
||||||
* nicely with D3D11 without vendor libraries */
|
* nicely with D3D11 without vendor libraries */
|
||||||
{ R"(\\Stray-Win64-Shipping\.exe$)", {{
|
{ R"(\\Stray-Win64-Shipping\.exe$)", {{
|
||||||
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
{ "d3d11.relaxedGraphicsBarriers", "True" },
|
||||||
}} },
|
}} },
|
||||||
/* Metal Gear Solid V: Ground Zeroes *
|
/* Metal Gear Solid V: Ground Zeroes *
|
||||||
* Texture quality can break at high vram */
|
* Texture quality can break at high vram */
|
||||||
@ -433,7 +432,7 @@ namespace dxvk {
|
|||||||
* and assumes that AMD GPUs do not expose *
|
* and assumes that AMD GPUs do not expose *
|
||||||
* native command lists for AGS usage */
|
* native command lists for AGS usage */
|
||||||
{ R"(\\granblue_fantasy_relink\.exe$)", {{
|
{ R"(\\granblue_fantasy_relink\.exe$)", {{
|
||||||
{ "d3d11.ignoreGraphicsBarriers", "True" },
|
{ "d3d11.relaxedGraphicsBarriers", "True" },
|
||||||
{ "d3d11.exposeDriverCommandLists", "False" },
|
{ "d3d11.exposeDriverCommandLists", "False" },
|
||||||
{ "dxgi.hideNvidiaGpu", "False" },
|
{ "dxgi.hideNvidiaGpu", "False" },
|
||||||
}} },
|
}} },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user