Texture Cache: Release stagging buffers on tick frame
This commit is contained in:
parent
58d1c7c77a
commit
4bc5469f52
6 changed files with 46 additions and 19 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue