summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-04-09 20:13:58 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-04-09 20:13:58 +0200
commitcd91e98dabc4faa2f8c508ecbcc11b1086e68b41 (patch)
treefb98e47a38a9e4d3b724e7ac408679238d21fd21 /src/video_core
parentMerge pull request #2371 from lioncash/pagetable (diff)
downloadyuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar.gz
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar.bz2
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar.lz
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar.xz
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.tar.zst
yuzu-cd91e98dabc4faa2f8c508ecbcc11b1086e68b41.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp4
1 files changed, 4 insertions, 0 deletions
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;