From 8c47318081de803a443bd688091c3295f690a519 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 16 Mar 2021 17:13:25 +0100 Subject: [PATCH] wined3d: Add a missing barrier to wined3d_shader_resource_view_vk_generate_mipmap(). Specifically, the one for using the new destination as blit target. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/view.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index 74a100405aa..fec7e950a64 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -1369,14 +1369,20 @@ void wined3d_shader_resource_view_vk_generate_mipmap(struct wined3d_shader_resou } else { + region.srcSubresource.mipLevel = ++vk_src_range.baseMipLevel; + region.dstSubresource.mipLevel = ++vk_dst_range.baseMipLevel; + wined3d_context_vk_image_barrier(context_vk, vk_command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + texture_vk->vk_image, &vk_src_range); + wined3d_context_vk_image_barrier(context_vk, vk_command_buffer, + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, + vk_access_mask_from_bind_flags(texture_vk->t.resource.bind_flags), + VK_ACCESS_TRANSFER_WRITE_BIT, + texture_vk->layout, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, texture_vk->vk_image, &vk_dst_range); - - region.srcSubresource.mipLevel = ++vk_src_range.baseMipLevel; - region.dstSubresource.mipLevel = ++vk_dst_range.baseMipLevel; } }