dzn: Don't do initial-layout barriers for simultaneous-access resources

Fixes: 4daeac01 ("dzn: Enhanced barriers fixes/workarounds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225>
This commit is contained in:
Jesse Natalie 2023-03-31 13:43:48 -07:00 committed by Marge Bot
parent 023f7b26dc
commit e16b55d861

View file

@ -4519,11 +4519,18 @@ dzn_rendering_attachment_initial_transition(struct dzn_cmd_buffer *cmdbuf,
access_before = D3D12_BARRIER_ACCESS_NO_ACCESS;
}
D3D12_BARRIER_LAYOUT layout_before = dzn_vk_layout_to_d3d_layout(initial_layout->initialLayout, cmdbuf->type, aspect);
D3D12_BARRIER_LAYOUT layout_after = dzn_vk_layout_to_d3d_layout(att->imageLayout, cmdbuf->type, aspect);
if (image->desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS) {
layout_before = D3D12_BARRIER_LAYOUT_UNDEFINED;
layout_after = D3D12_BARRIER_LAYOUT_UNDEFINED;
}
dzn_cmd_buffer_image_barrier(cmdbuf, image,
sync_before, D3D12_BARRIER_SYNC_DRAW,
access_before, D3D12_BARRIER_ACCESS_COMMON,
dzn_vk_layout_to_d3d_layout(initial_layout->initialLayout, cmdbuf->type, aspect),
dzn_vk_layout_to_d3d_layout(att->imageLayout, cmdbuf->type, aspect),
layout_before,
layout_after,
&range);
} else {
dzn_cmd_buffer_queue_image_range_layout_transition(cmdbuf, image, &range,