summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-05-11 04:02:14 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commit2131f715730580dfeb692acdf3ae3e62ffd455c1 (patch)
treefd567bf0f803fec889822f1a4101f141891a7391 /src/video_core/texture_cache
parentgl_texture_cache: Make main views be proxy textures instead of a full view. (diff)
downloadyuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.gz
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.bz2
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.lz
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.xz
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.zst
yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index e7e671d8c..6f39f8468 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -76,8 +76,10 @@ SurfaceParams SurfaceParams::CreateForTexture(Core::System& system,
params.type = GetFormatType(params.pixel_format);
// TODO: on 1DBuffer we should use the tic info.
params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
- params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(params.pixel_format));
- params.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format));
+ params.width =
+ Common::AlignBits(config.tic.Width(), GetCompressionFactorShift(params.pixel_format));
+ params.height =
+ Common::AlignBits(config.tic.Height(), GetCompressionFactorShift(params.pixel_format));
params.depth = config.tic.Depth();
if (params.target == SurfaceTarget::TextureCubemap ||
params.target == SurfaceTarget::TextureCubeArray) {