diff options
| author | 2019-05-10 23:02:14 -0300 | |
|---|---|---|
| committer | 2019-06-20 21:36:12 -0300 | |
| commit | 2131f715730580dfeb692acdf3ae3e62ffd455c1 (patch) | |
| tree | fd567bf0f803fec889822f1a4101f141891a7391 /src/video_core/texture_cache | |
| parent | gl_texture_cache: Make main views be proxy textures instead of a full view. (diff) | |
| download | yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.gz yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.tar.xz yuzu-2131f715730580dfeb692acdf3ae3e62ffd455c1.zip | |
surface_params: Optimize CreateForTexture
Instead of using Common::AlignUp, use Common::AlignBits to align the
texture compression factor.
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 6 |
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, | |||
| 76 | params.type = GetFormatType(params.pixel_format); | 76 | params.type = GetFormatType(params.pixel_format); |
| 77 | // TODO: on 1DBuffer we should use the tic info. | 77 | // TODO: on 1DBuffer we should use the tic info. |
| 78 | params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray()); | 78 | params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray()); |
| 79 | params.width = Common::AlignUp(config.tic.Width(), GetCompressionFactor(params.pixel_format)); | 79 | params.width = |
| 80 | params.height = Common::AlignUp(config.tic.Height(), GetCompressionFactor(params.pixel_format)); | 80 | Common::AlignBits(config.tic.Width(), GetCompressionFactorShift(params.pixel_format)); |
| 81 | params.height = | ||
| 82 | Common::AlignBits(config.tic.Height(), GetCompressionFactorShift(params.pixel_format)); | ||
| 81 | params.depth = config.tic.Depth(); | 83 | params.depth = config.tic.Depth(); |
| 82 | if (params.target == SurfaceTarget::TextureCubemap || | 84 | if (params.target == SurfaceTarget::TextureCubemap || |
| 83 | params.target == SurfaceTarget::TextureCubeArray) { | 85 | params.target == SurfaceTarget::TextureCubeArray) { |