From 8c9601b4cd27c0699b52c538aba74572892619c6 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Fri, 5 Aug 2022 19:15:27 +0000 Subject: [PATCH] [d3d9] Remove generalHazards option Move everything into MarkRenderHazard. We are doing a big bump for driver support anyway, no reason to keep this around. Old drivers can take the perf penalty. --- src/d3d9/d3d9_device.cpp | 14 ++++++-------- src/d3d9/d3d9_options.cpp | 7 ------- src/d3d9/d3d9_options.h | 4 ---- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index edae98ac..336baace 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5241,6 +5241,10 @@ namespace dxvk { void D3D9DeviceEx::MarkRenderHazards() { + EmitCs([](DxvkContext* ctx) { + ctx->emitGraphicsBarrier(); + }); + for (uint32_t rtIdx : bit::BitMask(m_activeHazardsRT)) { // Guaranteed to not be nullptr... auto tex = m_state.renderTargets[rtIdx]->GetCommonTexture(); @@ -5957,14 +5961,8 @@ namespace dxvk { void D3D9DeviceEx::PrepareDraw(D3DPRIMITIVETYPE PrimitiveType) { - if (unlikely(m_activeHazardsRT != 0)) { - EmitCs([](DxvkContext* ctx) { - ctx->emitGraphicsBarrier(); - }); - - if (m_d3d9Options.generalHazards) - MarkRenderHazards(); - } + if (unlikely(m_activeHazardsRT != 0)) + MarkRenderHazards(); if (unlikely((m_lastHazardsDS == 0) != (m_activeHazardsDS == 0))) { m_flags.set(D3D9DeviceFlag::DirtyFramebuffer); diff --git a/src/d3d9/d3d9_options.cpp b/src/d3d9/d3d9_options.cpp index ec44bf24..822bc455 100644 --- a/src/d3d9/d3d9_options.cpp +++ b/src/d3d9/d3d9_options.cpp @@ -75,13 +75,6 @@ namespace dxvk { this->seamlessCubes = config.getOption ("d3d9.seamlessCubes", false); this->textureMemory = config.getOption ("d3d9.textureMemory", 100) << 20; - // If we are not Nvidia, enable general hazards. - this->generalHazards = adapter != nullptr - && !adapter->matchesDriver( - VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, - 0, 0); - applyTristate(this->generalHazards, config.getOption("d3d9.generalHazards", Tristate::Auto)); - std::string floatEmulation = Config::toLower(config.getOption("d3d9.floatEmulation", "auto")); if (floatEmulation == "strict") { d3d9FloatEmulation = D3D9FloatEmulation::Strict; diff --git a/src/d3d9/d3d9_options.h b/src/d3d9/d3d9_options.h index 34d3ae1f..2a091fc4 100644 --- a/src/d3d9/d3d9_options.h +++ b/src/d3d9/d3d9_options.h @@ -67,10 +67,6 @@ namespace dxvk { /// Defer surface creation bool deferSurfaceCreation; - /// Whether to transition to general - /// for rendering hazards - bool generalHazards; - /// Anisotropic filter override /// /// Enforces anisotropic filtering with the