summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-04-23 21:37:13 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-04-29 15:31:38 +0200
commit4bc5469f52157cd18e697120df40e40e32365e89 (patch)
tree43879297dd91ac1ab824010610e724c37ec3cb95 /src/video_core/renderer_vulkan
parentAddress Feedback & Clang Format (diff)
downloadyuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar.gz
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar.bz2
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar.lz
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar.xz
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.tar.zst
yuzu-4bc5469f52157cd18e697120df40e40e32365e89.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp13
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.h5
2 files changed, 16 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index da3841bb3..d0a7d8f35 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include <algorithm>
@@ -1342,6 +1342,17 @@ void Image::UploadMemory(const StagingBufferRef& map, std::span<const BufferImag
UploadMemory(map.buffer, map.offset, copies);
}
+void Image::DownloadMemory(VkBuffer buffer, VkDeviceSize offset,
+ std::span<const VideoCommon::BufferImageCopy> copies) {
+ std::array buffer_handles{
+ buffer,
+ };
+ std::array buffer_offsets{
+ offset,
+ };
+ DownloadMemory(buffer_handles, buffer_offsets, copies);
+}
+
void Image::DownloadMemory(std::span<VkBuffer> buffers_span, std::span<VkDeviceSize> offsets_span,
std::span<const VideoCommon::BufferImageCopy> copies) {
const bool is_rescaled = True(flags & ImageFlagBits::Rescaled);
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h
index bdaf43ba4..c656c5386 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.h
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@@ -138,6 +138,9 @@ public:
void UploadMemory(const StagingBufferRef& map,
std::span<const VideoCommon::BufferImageCopy> copies);
+ void DownloadMemory(VkBuffer buffer, VkDeviceSize offset,
+ std::span<const VideoCommon::BufferImageCopy> copies);
+
void DownloadMemory(std::span<VkBuffer> buffers, std::span<VkDeviceSize> offsets,
std::span<const VideoCommon::BufferImageCopy> copies);