diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-30 00:08:06 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:29 +0100 |
commit | 05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3 (patch) | |
tree | 82a03ddad588a06a96121ea834197fe89cb9e6de /src | |
parent | gl_compute_pipeline: Add downscale factor to shader uniforms (diff) | |
download | yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar.gz yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar.bz2 yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar.lz yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar.xz yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.tar.zst yuzu-05d98d9bbffde2f43ff9558a8b1676dfca0bd0f3.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 5d14bfc97..8b86136e0 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -939,17 +939,21 @@ bool Image::Scale(bool scale_src, bool scale_dst) { const auto& draw_fbo = runtime->rescale_draw_fbo; glBindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_fbo.handle); glBindFramebuffer(GL_READ_FRAMEBUFFER, read_fbo.handle); - for (s32 level = 0; level < info.resources.levels; ++level) { - const u32 src_level_width = std::max(1u, src_width >> level); - const u32 src_level_height = std::max(1u, src_height >> level); - const u32 dst_level_width = std::max(1u, dst_width >> level); - const u32 dst_level_height = std::max(1u, dst_height >> level); - - glNamedFramebufferTexture(read_fbo.handle, attachment, texture.handle, level); - glNamedFramebufferTexture(draw_fbo.handle, attachment, dst_texture.handle, level); - glBlitNamedFramebuffer(read_fbo.handle, draw_fbo.handle, 0, 0, src_level_width, - src_level_height, 0, 0, dst_level_width, dst_level_height, mask, - filter); + for (s32 layer = 0; layer < info.resources.layers; ++layer) { + for (s32 level = 0; level < info.resources.levels; ++level) { + const u32 src_level_width = std::max(1u, src_width >> level); + const u32 src_level_height = std::max(1u, src_height >> level); + const u32 dst_level_width = std::max(1u, dst_width >> level); + const u32 dst_level_height = std::max(1u, dst_height >> level); + + glNamedFramebufferTextureLayer(read_fbo.handle, attachment, texture.handle, level, + layer); + glNamedFramebufferTextureLayer(draw_fbo.handle, attachment, dst_texture.handle, level, + layer); + glBlitNamedFramebuffer(read_fbo.handle, draw_fbo.handle, 0, 0, src_level_width, + src_level_height, 0, 0, dst_level_width, dst_level_height, mask, + filter); + } } texture = std::move(dst_texture); |