summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-06-07 06:26:36 +0200
committerSubv <subv2112@gmail.com>2018-06-07 06:26:36 +0200
commitf22e090b8665240beed28fd34f6bba833b816c7b (patch)
tree210293977d5c528fa2bdbd8b71e61bb245214321 /src/video_core
parentGLCache: Simplify the logic to copy from one texture to another in BlitTextures. (diff)
downloadyuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar.gz
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar.bz2
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar.lz
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar.xz
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.tar.zst
yuzu-f22e090b8665240beed28fd34f6bba833b816c7b.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index c860485c3..df2474ea2 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -1052,16 +1052,19 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu
params.UpdateParams();
- if (config.tic.Width() % 8 != 0 || config.tic.Height() % 8 != 0 ||
+ if (params.GetActualWidth() % 8 != 0 || params.GetActualHeight() % 8 != 0 ||
params.stride != params.width) {
Surface src_surface;
MathUtil::Rectangle<u32> rect;
std::tie(src_surface, rect) = GetSurfaceSubRect(params, ScaleMatch::Ignore, true);
+ rect = rect.Scale(params.GetCompresssionFactor());
+
params.res_scale = src_surface->res_scale;
Surface tmp_surface = CreateSurface(params);
- BlitTextures(src_surface->texture.handle, rect, tmp_surface->texture.handle,
- tmp_surface->GetScaledRect(),
+
+ auto dst_rect = tmp_surface->GetScaledRect().Scale(params.GetCompresssionFactor());
+ BlitTextures(src_surface->texture.handle, rect, tmp_surface->texture.handle, dst_rect,
SurfaceParams::GetFormatType(params.pixel_format), read_framebuffer.handle,
draw_framebuffer.handle);