diff --git a/Source/Core/VideoBackends/OGL/VertexManager.cpp b/Source/Core/VideoBackends/OGL/VertexManager.cpp index 6b18517555..3c31f01c5e 100644 --- a/Source/Core/VideoBackends/OGL/VertexManager.cpp +++ b/Source/Core/VideoBackends/OGL/VertexManager.cpp @@ -171,38 +171,6 @@ void VertexManager::vFlush(bool useDstAlpha) Draw(stride); - // If the GPU does not support dual-source blending, we can approximate the effect by drawing - // the object a second time, with the write mask set to alpha only using a shader that outputs - // the destination/constant alpha value (which would normally be SRC_COLOR.a). - // - // This is also used when logic ops and destination alpha is enabled, since we can't enable - // blending and logic ops concurrently. - bool logic_op_enabled = (bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable && - GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL); - if (useDstAlpha && (!dualSourcePossible || logic_op_enabled)) - { - ProgramShaderCache::SetShader(DSTALPHA_ALPHA_PASS, m_current_primitive_type); - - // only update alpha - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); - - glDisable(GL_BLEND); - - if (logic_op_enabled) - glDisable(GL_COLOR_LOGIC_OP); - - Draw(stride); - - // restore color mask - g_renderer->SetColorMask(); - - if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract) - glEnable(GL_BLEND); - - if (logic_op_enabled) - glEnable(GL_COLOR_LOGIC_OP); - } - #if defined(_DEBUG) || defined(DEBUGFAST) if (g_ActiveConfig.iLog & CONF_SAVESHADERS) { diff --git a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp index f3116a8cb6..251c3651ab 100644 --- a/Source/Core/VideoBackends/Vulkan/VertexManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/VertexManager.cpp @@ -202,27 +202,6 @@ void VertexManager::vFlush(bool use_dst_alpha) vkCmdDrawIndexed(g_command_buffer_mgr->GetCurrentCommandBuffer(), index_count, 1, m_current_draw_base_index, m_current_draw_base_vertex, 0); - // If the GPU does not support dual-source blending, we can approximate the effect by drawing - // the object a second time, with the write mask set to alpha only using a shader that outputs - // the destination/constant alpha value (which would normally be SRC_COLOR.a). - // - // This is also used when logic ops and destination alpha is enabled, since we can't enable - // blending and logic ops concurrently (and the logical operation applies to all channels). - bool logic_op_enabled = bpmem.blendmode.logicopenable && !bpmem.blendmode.blendenable; - if (use_dst_alpha && (!g_vulkan_context->SupportsDualSourceBlend() || logic_op_enabled)) - { - StateTracker::GetInstance()->CheckForShaderChanges(m_current_primitive_type, - DSTALPHA_ALPHA_PASS); - if (!StateTracker::GetInstance()->Bind()) - { - WARN_LOG(VIDEO, "Skipped draw of %u indices (alpha pass)", index_count); - return; - } - - vkCmdDrawIndexed(g_command_buffer_mgr->GetCurrentCommandBuffer(), index_count, 1, - m_current_draw_base_index, m_current_draw_base_vertex, 0); - } - StateTracker::GetInstance()->OnDraw(); }