mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-01 00:12:55 +00:00
vk_texture_cache: Use Download memory types for texture flushes
Use the Download memory type where it matters.
This commit is contained in:
parent
8f22f5470c
commit
432f045dba
|
@ -555,7 +555,15 @@ void TextureCacheRuntime::Finish() {
|
||||||
|
|
||||||
ImageBufferMap TextureCacheRuntime::MapUploadBuffer(size_t size) {
|
ImageBufferMap TextureCacheRuntime::MapUploadBuffer(size_t size) {
|
||||||
const auto staging_ref = staging_buffer_pool.Request(size, MemoryUsage::Upload);
|
const auto staging_ref = staging_buffer_pool.Request(size, MemoryUsage::Upload);
|
||||||
return ImageBufferMap{
|
return {
|
||||||
|
.handle = staging_ref.buffer,
|
||||||
|
.span = staging_ref.mapped_span,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageBufferMap TextureCacheRuntime::MapDownloadBuffer(size_t size) {
|
||||||
|
const auto staging_ref = staging_buffer_pool.Request(size, MemoryUsage::Download);
|
||||||
|
return {
|
||||||
.handle = staging_ref.buffer,
|
.handle = staging_ref.buffer,
|
||||||
.span = staging_ref.mapped_span,
|
.span = staging_ref.mapped_span,
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,10 +78,7 @@ struct TextureCacheRuntime {
|
||||||
|
|
||||||
[[nodiscard]] ImageBufferMap MapUploadBuffer(size_t size);
|
[[nodiscard]] ImageBufferMap MapUploadBuffer(size_t size);
|
||||||
|
|
||||||
[[nodiscard]] ImageBufferMap MapDownloadBuffer(size_t size) {
|
[[nodiscard]] ImageBufferMap MapDownloadBuffer(size_t size);
|
||||||
// TODO: Have a special function for this
|
|
||||||
return MapUploadBuffer(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BlitImage(Framebuffer* dst_framebuffer, ImageView& dst, ImageView& src,
|
void BlitImage(Framebuffer* dst_framebuffer, ImageView& dst, ImageView& src,
|
||||||
const std::array<Offset2D, 2>& dst_region,
|
const std::array<Offset2D, 2>& dst_region,
|
||||||
|
|
Loading…
Reference in a new issue