vk: Fix image properties for flip temporary images to be samplable.

- In case of gamma correction or other effects, they may require shader access.
- BGRA8_UNORM is usually safe to use directly without staging memory.
This commit is contained in:
kd-11 2020-03-04 21:59:51 +03:00 committed by kd-11
parent 1725f7a34b
commit 93295f7f50
2 changed files with 3 additions and 1 deletions

View File

@ -1153,6 +1153,8 @@ namespace vk
for (auto& img : src)
{
// Only raw uploads can possibly have mismatched layout here
img->change_layout(cmd, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
views.push_back(img->get_view(VK_REMAP_IDENTITY, rsx::default_remap_vector));
}

View File

@ -1480,7 +1480,7 @@ namespace vk
VK_IMAGE_TYPE_2D,
VK_FORMAT_B8G8R8A8_UNORM,
width, height, 1, 1, 1, VK_SAMPLE_COUNT_1_BIT, VK_IMAGE_LAYOUT_PREINITIALIZED,
VK_IMAGE_TILING_LINEAR, VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 0);
VK_IMAGE_TILING_LINEAR, VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_SAMPLED_BIT, 0);
VkImageSubresource subresource{};
subresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;