mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 08:09:19 +00:00
OGL/Vulkan: Drop dual pass alpha.
This commit is contained in:
parent
f46f779f70
commit
b7d8bd13a6
2 changed files with 0 additions and 53 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue