summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-11 03:17:03 +0200
committerGitHub <noreply@github.com>2019-04-11 03:17:03 +0200
commit0371650bd77ae8a13d5a815a03d591f26a04876a (patch)
tree64d0aa16e0cb562761915f51ba1e29778beece8f /src/video_core
parentMerge pull request #2345 from ReinUsesLisp/multibind (diff)
parentCorrect Fermi Copy on Linear Textures. (diff)
downloadyuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar.gz
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar.bz2
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar.lz
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar.xz
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.tar.zst
yuzu-0371650bd77ae8a13d5a815a03d591f26a04876a.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 aa6da1944..9026a9452 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -266,6 +266,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;