mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
vk: Add some missing image memory barriers causing artifacting on AMD cards
- There needs to be a memory barrier after each step. - TODO: Optimize scale_typeless_safe function
This commit is contained in:
parent
309251ce7a
commit
086ecf4ba6
1 changed files with 10 additions and 0 deletions
|
@ -453,9 +453,19 @@ namespace vk
|
|||
if (src_rect.x1 > src_rect.x2) src_rect2.flip_horizontal();
|
||||
if (src_rect.y1 > src_rect.y2) src_rect2.flip_vertical();
|
||||
|
||||
insert_image_memory_barrier(cmd, typeless, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT,
|
||||
{ VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 });
|
||||
|
||||
copy_scaled_image(cmd, typeless, typeless, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL,
|
||||
src_rect2, { 0, src_h, dst_w, (src_h + dst_h) }, 1, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_COLOR_BIT, filter);
|
||||
|
||||
insert_image_memory_barrier(cmd, typeless, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT,
|
||||
{ VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 });
|
||||
|
||||
//3. Copy back the aspect bits
|
||||
info.imageExtent = { static_cast<u32>(dst_w), static_cast<u32>(dst_h), 1 };
|
||||
info.imageOffset = { 0, src_h, 0 };
|
||||
|
|
Loading…
Add table
Reference in a new issue