mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Implement "Skip" ubershader mode
Skip ubershader mode works the same as hybrid ubershaders in that the shaders are compiled asynchronously. However, instead of using the ubershader to draw the object, it skips it entirely until the specialized shader is made available. This mode will likely result in broken effects where a game creates an EFB copy, and does not redraw it every frame. Therefore, it is not a recommended option, however, it may result in better performance on low-end systems.
This commit is contained in:
parent
5c83e18fbd
commit
2f1a7cbee1
22 changed files with 292 additions and 127 deletions
|
@ -166,16 +166,19 @@ void VertexManager::vFlush()
|
|||
}
|
||||
|
||||
// Bind all pending state to the command buffer
|
||||
g_renderer->SetPipeline(m_current_pipeline_object);
|
||||
if (!StateTracker::GetInstance()->Bind())
|
||||
if (m_current_pipeline_object)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Skipped draw of %u indices", index_count);
|
||||
return;
|
||||
}
|
||||
g_renderer->SetPipeline(m_current_pipeline_object);
|
||||
if (!StateTracker::GetInstance()->Bind())
|
||||
{
|
||||
WARN_LOG(VIDEO, "Skipped draw of %u indices", index_count);
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute the draw
|
||||
vkCmdDrawIndexed(g_command_buffer_mgr->GetCurrentCommandBuffer(), index_count, 1,
|
||||
m_current_draw_base_index, m_current_draw_base_vertex, 0);
|
||||
// Execute the draw
|
||||
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