summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-10 01:31:20 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:29 +0100
commit29710f3250413bac75eddb613b7f7d2c079021c2 (patch)
tree6e635612c099e57191a98bc61e1f0b5bbdebf294 /src/video_core
parentRenderer: Implement Bicubic and ScaleForce filters. (diff)
downloadyuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar.gz
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar.bz2
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar.lz
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar.xz
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.tar.zst
yuzu-29710f3250413bac75eddb613b7f7d2c079021c2.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 6aea375f1..edb8503cb 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -693,6 +693,10 @@ Image::~Image() = default;
void Image::UploadMemory(const ImageBufferMap& map,
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);
glFlushMappedBufferRange(GL_PIXEL_UNPACK_BUFFER, map.offset, unswizzled_size_bytes);
@@ -712,6 +716,9 @@ void Image::UploadMemory(const ImageBufferMap& map,
}
CopyBufferToImage(copy, map.offset);
}
+ if (is_rescaled) {
+ ScaleUp();
+ }
}
void Image::DownloadMemory(ImageBufferMap& map,