summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-08-13 01:12:08 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-08-13 03:22:39 +0200
commit5a37b8f2c1e724671e900fef31435b0ff66a9b73 (patch)
tree0a58be4ca860ec01b9f6633bc6c43018967e1abd /src/video_core/renderer_vulkan
parentMerge pull request #11219 from zeltermann/title-id-search (diff)
downloadyuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar.gz
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar.bz2
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar.lz
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar.xz
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.tar.zst
yuzu-5a37b8f2c1e724671e900fef31435b0ff66a9b73.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp7
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{&copy, 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);
}