summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-06-08 19:27:19 +0200
committerSubv <subv2112@gmail.com>2018-06-08 19:27:19 +0200
commit8d9534d830226f7095796da8358ef980f46af32e (patch)
tree9337f6c89f6d757826f8f76b857dff27481be193 /src
parentMerge pull request #478 from janisozaur/patch-1 (diff)
downloadyuzu-8d9534d830226f7095796da8358ef980f46af32e.tar
yuzu-8d9534d830226f7095796da8358ef980f46af32e.tar.gz
yuzu-8d9534d830226f7095796da8358ef980f46af32e.tar.bz2
yuzu-8d9534d830226f7095796da8358ef980f46af32e.tar.lz
yuzu-8d9534d830226f7095796da8358ef980f46af32e.tar.xz
yuzu-8d9534d830226f7095796da8358ef980f46af32e.tar.zst
yuzu-8d9534d830226f7095796da8358ef980f46af32e.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index df2474ea2..ff48a2669 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -1033,8 +1033,11 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu
params.addr = config.tic.Address();
params.is_tiled = config.tic.IsTiled();
params.pixel_format = SurfaceParams::PixelFormatFromTextureFormat(config.tic.format);
- params.width = config.tic.Width() / params.GetCompresssionFactor();
- params.height = config.tic.Height() / params.GetCompresssionFactor();
+
+ params.width = Common::AlignUp(config.tic.Width(), params.GetCompresssionFactor()) /
+ params.GetCompresssionFactor();
+ params.height = Common::AlignUp(config.tic.Height(), params.GetCompresssionFactor()) /
+ params.GetCompresssionFactor();
// TODO(Subv): Different types per component are not supported.
ASSERT(config.tic.r_type.Value() == config.tic.g_type.Value() &&
@@ -1045,6 +1048,8 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu
if (config.tic.IsTiled()) {
params.block_height = config.tic.BlockHeight();
+ params.width = Common::AlignUp(params.width, params.block_height);
+ params.height = Common::AlignUp(params.height, params.block_height);
} else {
// Use the texture-provided stride value if the texture isn't tiled.
params.stride = static_cast<u32>(params.PixelsInBytes(config.tic.Pitch()));