From 7ddf6386f12aa07a68e29a57f48af95c69a5f396 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 29 Mar 2024 16:42:42 +1000 Subject: [PATCH] GS: Remove DSB feature No longer needed, since it's mandatory. --- bin/resources/shaders/opengl/tfx_fs.glsl | 2 +- pcsx2/GS/Renderers/Common/GSDevice.h | 1 - pcsx2/GS/Renderers/DX11/GSDevice11.cpp | 1 - pcsx2/GS/Renderers/DX12/GSDevice12.cpp | 1 - pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 3 +-- pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm | 1 - pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp | 1 - pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp | 7 ------- 8 files changed, 2 insertions(+), 15 deletions(-) diff --git a/bin/resources/shaders/opengl/tfx_fs.glsl b/bin/resources/shaders/opengl/tfx_fs.glsl index 3ff82e831f..41b889501c 100644 --- a/bin/resources/shaders/opengl/tfx_fs.glsl +++ b/bin/resources/shaders/opengl/tfx_fs.glsl @@ -1125,7 +1125,7 @@ void ps_main() #else SV_Target0.rgb = C.rgb / 255.0f; #endif - #if !defined(DISABLE_DUAL_SOURCE) && !PS_NO_COLOR1 + #if !PS_NO_COLOR1 SV_Target1 = alpha_blend; #endif #endif diff --git a/pcsx2/GS/Renderers/Common/GSDevice.h b/pcsx2/GS/Renderers/Common/GSDevice.h index c46ff45cb7..ad5df7769a 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.h +++ b/pcsx2/GS/Renderers/Common/GSDevice.h @@ -728,7 +728,6 @@ public: bool dxt_textures : 1; ///< Supports DXTn texture compression, i.e. S3TC and BC1-3. bool bptc_textures : 1; ///< Supports BC6/7 texture compression. bool framebuffer_fetch : 1; ///< Can sample from the framebuffer without texture barriers. - bool dual_source_blend : 1; ///< Can use alpha output as a blend factor. bool clip_control : 1; ///< Can use 0..1 depth range instead of -1..1. bool stencil_buffer : 1; ///< Supports stencil buffer, and can use for DATE. bool cas_sharpening : 1; ///< Supports sufficient functionality for contrast adaptive sharpening. diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 056650638a..045c1c79af 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -51,7 +51,6 @@ GSDevice11::GSDevice11() m_features.dxt_textures = false; m_features.bptc_textures = false; m_features.framebuffer_fetch = false; - m_features.dual_source_blend = true; m_features.stencil_buffer = true; m_features.clip_control = true; m_features.cas_sharpening = true; diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index 3db0083909..d587748d41 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -1195,7 +1195,6 @@ bool GSDevice12::CheckFeatures() m_features.point_expand = false; m_features.line_expand = false; m_features.framebuffer_fetch = false; - m_features.dual_source_blend = true; m_features.clip_control = true; m_features.stencil_buffer = true; m_features.cas_sharpening = true; diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index b34f2bf0c7..908d756717 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -3950,8 +3950,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, bool& DAT const bool blend_non_recursive = !!(blend_flag & BLEND_NO_REC); // BLEND MIX selection, use a mix of hw/sw blending - const bool blend_mix1 = !!(blend_flag & BLEND_MIX1) && - (features.dual_source_blend || !(m_conf.ps.blend_b == m_conf.ps.blend_d && (alpha_c0_high_min_one || alpha_c2_high_one))); + const bool blend_mix1 = !!(blend_flag & BLEND_MIX1) && !(m_conf.ps.blend_b == m_conf.ps.blend_d && (alpha_c0_high_min_one || alpha_c2_high_one)); const bool blend_mix2 = !!(blend_flag & BLEND_MIX2); const bool blend_mix3 = !!(blend_flag & BLEND_MIX3); bool blend_mix = (blend_mix1 || blend_mix2 || blend_mix3) && COLCLAMP.CLAMP; diff --git a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm index 3ea99feb75..277389df33 100644 --- a/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm +++ b/pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm @@ -897,7 +897,6 @@ bool GSDeviceMTL::Create() m_features.dxt_textures = true; m_features.bptc_textures = true; m_features.framebuffer_fetch = m_dev.features.framebuffer_fetch && !GSConfig.DisableFramebufferFetch; - m_features.dual_source_blend = true; m_features.clip_control = true; m_features.stencil_buffer = true; m_features.cas_sharpening = true; diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index 4138ed01e5..73d6d975ae 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -733,7 +733,6 @@ bool GSDeviceOGL::CheckFeatures(bool& buggy_pbo) m_features.bptc_textures = GLAD_GL_VERSION_4_2 || GLAD_GL_ARB_texture_compression_bptc || GLAD_GL_EXT_texture_compression_bptc; m_features.prefer_new_textures = false; - m_features.dual_source_blend = true; m_features.clip_control = GLAD_GL_ARB_clip_control; if (!m_features.clip_control) Host::AddOSDMessage( diff --git a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp index 4b591a016b..a9516a65a0 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp @@ -2669,13 +2669,9 @@ bool GSDeviceVK::CheckFeatures() m_features.prefer_new_textures = true; m_features.provoking_vertex_last = m_optional_extensions.vk_ext_provoking_vertex; - m_features.dual_source_blend = m_device_features.dualSrcBlend; m_features.clip_control = true; m_features.vs_expand = !GSConfig.DisableVertexShaderExpand; - if (!m_features.dual_source_blend) - Console.Warning("Vulkan driver is missing dual-source blending. This will have an impact on performance."); - if (!m_features.texture_barrier) Console.Warning("Texture buffers are disabled. This may break some graphical effects."); @@ -2705,7 +2701,6 @@ bool GSDeviceVK::CheckFeatures() DevCon.WriteLn("Optional features:%s%s%s%s%s%s", m_features.primitive_id ? " primitive_id" : "", m_features.texture_barrier ? " texture_barrier" : "", m_features.framebuffer_fetch ? " framebuffer_fetch" : "", - m_features.dual_source_blend ? " dual_source_blend" : "", m_features.provoking_vertex_last ? " provoking_vertex_last" : "", m_features.vs_expand ? " vs_expand" : ""); DevCon.WriteLn("Using %s for point expansion and %s for line expansion.", m_features.point_expand ? "hardware" : "vertex expanding", @@ -3661,8 +3656,6 @@ static void AddShaderHeader(std::stringstream& ss) if (!features.texture_barrier) ss << "#define DISABLE_TEXTURE_BARRIER 1\n"; - if (!features.dual_source_blend) - ss << "#define DISABLE_DUAL_SOURCE 1\n"; if (features.texture_barrier && dev->UseFeedbackLoopLayout()) ss << "#define HAS_FEEDBACK_LOOP_LAYOUT 1\n"; }