diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 08:02:37 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 08:13:33 +0100 |
commit | fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a (patch) | |
tree | a4c0f339d33ec9a90f15b88c4d1fada864f73adc /src/video_core/texture_cache/accelerated_swizzle.cpp | |
parent | Merge pull request #5352 from ReinUsesLisp/remove-tester (diff) | |
download | yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar.gz yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar.bz2 yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar.lz yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar.xz yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.tar.zst yuzu-fe494a0ccdddc8e7a7f54ca93de090100fc3fb8a.zip |
Diffstat (limited to 'src/video_core/texture_cache/accelerated_swizzle.cpp')
-rw-r--r-- | src/video_core/texture_cache/accelerated_swizzle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/accelerated_swizzle.cpp b/src/video_core/texture_cache/accelerated_swizzle.cpp index a4fc1184b..15585caeb 100644 --- a/src/video_core/texture_cache/accelerated_swizzle.cpp +++ b/src/video_core/texture_cache/accelerated_swizzle.cpp @@ -27,7 +27,7 @@ BlockLinearSwizzle2DParams MakeBlockLinearSwizzle2DParams(const SwizzleParameter const Extent3D num_tiles = swizzle.num_tiles; const u32 bytes_per_block = BytesPerBlock(info.format); const u32 stride_alignment = CalculateLevelStrideAlignment(info, swizzle.level); - const u32 stride = Common::AlignBits(num_tiles.width, stride_alignment) * bytes_per_block; + const u32 stride = Common::AlignUpLog2(num_tiles.width, stride_alignment) * bytes_per_block; const u32 gobs_in_x = Common::DivCeilLog2(stride, GOB_SIZE_X_SHIFT); return BlockLinearSwizzle2DParams{ .origin{0, 0, 0}, @@ -47,7 +47,7 @@ BlockLinearSwizzle3DParams MakeBlockLinearSwizzle3DParams(const SwizzleParameter const Extent3D num_tiles = swizzle.num_tiles; const u32 bytes_per_block = BytesPerBlock(info.format); const u32 stride_alignment = CalculateLevelStrideAlignment(info, swizzle.level); - const u32 stride = Common::AlignBits(num_tiles.width, stride_alignment) * bytes_per_block; + const u32 stride = Common::AlignUpLog2(num_tiles.width, stride_alignment) * bytes_per_block; const u32 gobs_in_x = (stride + GOB_SIZE_X - 1) >> GOB_SIZE_X_SHIFT; const u32 block_size = gobs_in_x << (GOB_SIZE_SHIFT + block.height + block.depth); |