mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06: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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user