diff options
author | Subv <subv2112@gmail.com> | 2018-04-16 02:53:15 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-18 19:52:51 +0200 |
commit | 6b63aaa5b4f55621117e27c6b80979908c255e75 (patch) | |
tree | 14ea1f2ecd3c195867f22a4ae6e68626d13e2dd7 /src/video_core/renderer_opengl | |
parent | GPU/TIC: Added the pitch and block height fields to the TIC structure. (diff) | |
download | yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar.gz yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar.bz2 yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar.lz yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar.xz yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.tar.zst yuzu-6b63aaa5b4f55621117e27c6b80979908c255e75.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 213b20a21..9d005936d 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -1041,9 +1041,18 @@ Surface RasterizerCacheOpenGL::GetTextureSurface(const Tegra::Texture::FullTextu params.height = config.tic.Height(); params.is_tiled = config.tic.IsTiled(); params.pixel_format = SurfaceParams::PixelFormatFromTextureFormat(config.tic.format); + + if (config.tic.IsTiled()) { + params.block_height = config.tic.BlockHeight(); + } else { + // Use the texture-provided stride value if the texture isn't tiled. + params.stride = params.PixelsInBytes(config.tic.Pitch()); + } + params.UpdateParams(); - if (config.tic.Width() % 8 != 0 || config.tic.Height() % 8 != 0) { + if (config.tic.Width() % 8 != 0 || config.tic.Height() % 8 != 0 || + params.stride != params.width) { Surface src_surface; MathUtil::Rectangle<u32> rect; std::tie(src_surface, rect) = GetSurfaceSubRect(params, ScaleMatch::Ignore, true); |