vk: Workaround for validation layers bug

This commit is contained in:
kd-11 2020-12-16 21:05:06 +03:00 committed by kd-11
parent 6b3f722ff0
commit 0a865bd9dc
1 changed files with 3 additions and 1 deletions

View File

@ -805,10 +805,12 @@ void VKGSRender::emit_geometry(u32 sub_index)
if (!m_current_subdraw_id++) if (!m_current_subdraw_id++)
{ {
vkCmdBindPipeline(*m_current_command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_program->pipeline);
update_draw_state(); update_draw_state();
begin_render_pass(); begin_render_pass();
// Bind pipeline after starting the renderpass to work around some validation layer spam about format mismatch
vkCmdBindPipeline(*m_current_command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, m_program->pipeline);
if (cond_render_ctrl.hw_cond_active && m_device->get_conditional_render_support()) if (cond_render_ctrl.hw_cond_active && m_device->get_conditional_render_support())
{ {
// It is inconvenient that conditional rendering breaks other things like compute dispatch // It is inconvenient that conditional rendering breaks other things like compute dispatch