mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
gl_texture_cache: fix scaling on upload
This commit is contained in:
parent
a6b88e85bf
commit
29710f3250
1 changed files with 7 additions and 0 deletions
|
@ -693,6 +693,10 @@ Image::~Image() = default;
|
||||||
|
|
||||||
void Image::UploadMemory(const ImageBufferMap& map,
|
void Image::UploadMemory(const ImageBufferMap& map,
|
||||||
std::span<const VideoCommon::BufferImageCopy> copies) {
|
std::span<const VideoCommon::BufferImageCopy> copies) {
|
||||||
|
const bool is_rescaled = True(flags & ImageFlagBits::Rescaled);
|
||||||
|
if (is_rescaled) {
|
||||||
|
ScaleDown();
|
||||||
|
}
|
||||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, map.buffer);
|
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, map.buffer);
|
||||||
glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, map.offset, unswizzled_size_bytes);
|
glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, map.offset, unswizzled_size_bytes);
|
||||||
|
|
||||||
|
@ -712,6 +716,9 @@ void Image::UploadMemory(const ImageBufferMap& map,
|
||||||
}
|
}
|
||||||
CopyBufferToImage(copy, map.offset);
|
CopyBufferToImage(copy, map.offset);
|
||||||
}
|
}
|
||||||
|
if (is_rescaled) {
|
||||||
|
ScaleUp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Image::DownloadMemory(ImageBufferMap& map,
|
void Image::DownloadMemory(ImageBufferMap& map,
|
||||||
|
|
Loading…
Reference in a new issue