vkd3d: Fix transfer batch clobbering state in begin_render_pass.

Transfer batch can clobber graphics pipeline for e.g. depth->color copies.
Hence, flushing the batches after applying the graphics pipeline set by the
app can cause correctness issues.

To prevent that, do the transfer batch flush first before we apply any
render-related states.

Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
This commit is contained in:
Tatsuyuki Ishi 2022-06-28 20:30:48 +09:00 committed by Hans-Kristian Arntzen
parent 9b5f3bfc26
commit 02c7ec404c
1 changed files with 2 additions and 2 deletions

View File

@ -5353,6 +5353,8 @@ static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list
const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs;
struct d3d12_graphics_pipeline_state *graphics;
d3d12_command_list_end_transfer_batch(list);
d3d12_command_list_promote_dsv_layout(list);
if (!d3d12_command_list_update_graphics_pipeline(list))
return false;
@ -5370,8 +5372,6 @@ static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list
return true;
}
d3d12_command_list_end_transfer_batch(list);
if (!(list->rendering_info.state_flags & VKD3D_RENDERING_SUSPENDED))
d3d12_command_list_emit_render_pass_transition(list, VKD3D_RENDER_PASS_TRANSITION_MODE_BEGIN);