diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-08-18 15:12:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-18 15:12:27 +0200 |
commit | ae1421265abe1fd5633cab5a54b59dcd818866c7 (patch) | |
tree | 741dd1c97c5c2e0f4d63199ccff15c3a3769f4f3 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | Merge pull request #11288 from liamwhite/svc-tick (diff) | |
parent | Mark accelerted DMA destination buffers and images as GPU-modified (diff) | |
download | yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar.gz yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar.bz2 yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar.lz yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar.xz yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.tar.zst yuzu-ae1421265abe1fd5633cab5a54b59dcd818866c7.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index aa59889bd..89aa243d2 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -830,7 +830,8 @@ bool AccelerateDMA::DmaBufferImageCopy(const Tegra::DMA::ImageCopy& copy_info, } const u32 buffer_size = static_cast<u32>(buffer_operand.pitch * buffer_operand.height); static constexpr auto sync_info = VideoCommon::ObtainBufferSynchronize::FullSynchronize; - const auto post_op = VideoCommon::ObtainBufferOperation::DoNothing; + const auto post_op = IS_IMAGE_UPLOAD ? VideoCommon::ObtainBufferOperation::DoNothing + : VideoCommon::ObtainBufferOperation::MarkAsWritten; const auto [buffer, offset] = buffer_cache.ObtainBuffer(buffer_operand.address, buffer_size, sync_info, post_op); @@ -839,8 +840,12 @@ bool AccelerateDMA::DmaBufferImageCopy(const Tegra::DMA::ImageCopy& copy_info, const std::span copy_span{©, 1}; if constexpr (IS_IMAGE_UPLOAD) { + texture_cache.PrepareImage(image_id, true, false); image->UploadMemory(buffer->Handle(), offset, copy_span); } else { + if (offset % BytesPerBlock(image->info.format)) { + return false; + } texture_cache.DownloadImageIntoBuffer(image, buffer->Handle(), offset, copy_span, buffer_operand.address, buffer_size); } |