From cd91e98dabc4faa2f8c508ecbcc11b1086e68b41 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Tue, 9 Apr 2019 14:13:58 -0400 Subject: [PATCH] Correct Fermi Copy on Linear Textures. --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 7a3280620..8c4d0af46 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -265,6 +265,10 @@ std::size_t SurfaceParams::InnerMemorySize(bool force_gl, bool layer_only, params.component_type = ComponentTypeFromRenderTarget(config.format); params.type = GetFormatType(params.pixel_format); params.width = config.width; + if (!params.is_tiled) { + const u32 bpp = params.GetFormatBpp() / 8; + params.pitch = config.width * bpp; + } params.height = config.height; params.unaligned_height = config.height; params.target = SurfaceTarget::Texture2D;