From 673145d7a4c1f16b9d8c0cf7b5cf29a8a8fcc9c2 Mon Sep 17 00:00:00 2001 From: psucien Date: Mon, 23 Dec 2024 18:20:37 +0100 Subject: [PATCH] hot-fix: missing fce barrier --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index ec099b9f..417b6d4b 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -216,7 +216,7 @@ void Rasterizer::EliminateFastClear() { const auto& hint = liverpool->last_cb_extent[0]; VideoCore::TextureCache::RenderTargetDesc desc(col_buf, hint); const auto& image_view = texture_cache.FindRenderTarget(desc); - const auto& image = texture_cache.GetImage(image_view.image_id); + auto& image = texture_cache.GetImage(image_view.image_id); const vk::ImageSubresourceRange range = { .aspectMask = vk::ImageAspectFlagBits::eColor, .baseMipLevel = 0, @@ -225,7 +225,8 @@ void Rasterizer::EliminateFastClear() { .layerCount = col_buf.view.slice_max - col_buf.view.slice_start + 1, }; scheduler.EndRendering(); - scheduler.CommandBuffer().clearColorImage(image.image, vk::ImageLayout::eColorAttachmentOptimal, + image.Transit(vk::ImageLayout::eTransferDstOptimal, vk::AccessFlagBits2::eTransferWrite, {}); + scheduler.CommandBuffer().clearColorImage(image.image, image.last_state.layout, LiverpoolToVK::ColorBufferClearValue(col_buf).color, range); }