mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
radv: move pipeline barrier image transitions after src flushing
This seems like it would conform better with the spec. noticed while digging into fast clears. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
3fd79558be
commit
ea417f5335
1 changed files with 12 additions and 8 deletions
|
|
@ -2246,19 +2246,11 @@ void radv_CmdPipelineBarrier(
|
|||
}
|
||||
|
||||
for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) {
|
||||
RADV_FROM_HANDLE(radv_image, image, pImageMemoryBarriers[i].image);
|
||||
src_flags |= pImageMemoryBarriers[i].srcAccessMask;
|
||||
dst_flags |= pImageMemoryBarriers[i].dstAccessMask;
|
||||
|
||||
radv_handle_image_transition(cmd_buffer, image,
|
||||
pImageMemoryBarriers[i].oldLayout,
|
||||
pImageMemoryBarriers[i].newLayout,
|
||||
pImageMemoryBarriers[i].subresourceRange,
|
||||
0);
|
||||
}
|
||||
|
||||
enum radv_cmd_flush_bits flush_bits = 0;
|
||||
|
||||
for_each_bit(b, src_flags) {
|
||||
switch ((VkAccessFlagBits)(1 << b)) {
|
||||
case VK_ACCESS_SHADER_WRITE_BIT:
|
||||
|
|
@ -2277,6 +2269,18 @@ void radv_CmdPipelineBarrier(
|
|||
break;
|
||||
}
|
||||
}
|
||||
cmd_buffer->state.flush_bits |= flush_bits;
|
||||
|
||||
for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) {
|
||||
RADV_FROM_HANDLE(radv_image, image, pImageMemoryBarriers[i].image);
|
||||
radv_handle_image_transition(cmd_buffer, image,
|
||||
pImageMemoryBarriers[i].oldLayout,
|
||||
pImageMemoryBarriers[i].newLayout,
|
||||
pImageMemoryBarriers[i].subresourceRange,
|
||||
0);
|
||||
}
|
||||
|
||||
flush_bits = 0;
|
||||
|
||||
for_each_bit(b, dst_flags) {
|
||||
switch ((VkAccessFlagBits)(1 << b)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue