diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-05 00:47:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 00:47:26 +0100 |
commit | 38c1c500ab733208d86972f61c29d6679c502c31 (patch) | |
tree | cfe859b9c8f92bada0c6902953470e627769d9ec /src/video_core/textures/decoders.cpp | |
parent | Merge pull request #1645 from dharmin/master (diff) | |
parent | Fix ASTC Decompressor to support depth parameter (diff) | |
download | yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar.gz yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar.bz2 yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar.lz yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar.xz yuzu-38c1c500ab733208d86972f61c29d6679c502c31.tar.zst yuzu-38c1c500ab733208d86972f61c29d6679c502c31.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/textures/decoders.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 550ca856c..3066abf61 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -227,12 +227,14 @@ u32 BytesPerPixel(TextureFormat format) { } } -std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size, u32 bytes_per_pixel, u32 width, - u32 height, u32 depth, u32 block_height, u32 block_depth) { +std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size_x, u32 tile_size_y, + u32 bytes_per_pixel, u32 width, u32 height, u32 depth, + u32 block_height, u32 block_depth) { std::vector<u8> unswizzled_data(width * height * depth * bytes_per_pixel); - CopySwizzledData(width / tile_size, height / tile_size, depth, bytes_per_pixel, bytes_per_pixel, - Memory::GetPointer(address), unswizzled_data.data(), true, block_height, - block_depth); + CopySwizzledData((width + tile_size_x - 1) / tile_size_x, + (height + tile_size_y - 1) / tile_size_y, depth, bytes_per_pixel, + bytes_per_pixel, Memory::GetPointer(address), unswizzled_data.data(), true, + block_height, block_depth); return unswizzled_data; } |