diff options
Diffstat (limited to 'src/video_core/textures')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.h | 4 |
2 files changed, 9 insertions, 7 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) { | |||
| 227 | } | 227 | } |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size, u32 bytes_per_pixel, u32 width, | 230 | std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size_x, u32 tile_size_y, |
| 231 | u32 height, u32 depth, u32 block_height, u32 block_depth) { | 231 | u32 bytes_per_pixel, u32 width, u32 height, u32 depth, |
| 232 | u32 block_height, u32 block_depth) { | ||
| 232 | std::vector<u8> unswizzled_data(width * height * depth * bytes_per_pixel); | 233 | std::vector<u8> unswizzled_data(width * height * depth * bytes_per_pixel); |
| 233 | CopySwizzledData(width / tile_size, height / tile_size, depth, bytes_per_pixel, bytes_per_pixel, | 234 | CopySwizzledData((width + tile_size_x - 1) / tile_size_x, |
| 234 | Memory::GetPointer(address), unswizzled_data.data(), true, block_height, | 235 | (height + tile_size_y - 1) / tile_size_y, depth, bytes_per_pixel, |
| 235 | block_depth); | 236 | bytes_per_pixel, Memory::GetPointer(address), unswizzled_data.data(), true, |
| 237 | block_height, block_depth); | ||
| 236 | return unswizzled_data; | 238 | return unswizzled_data; |
| 237 | } | 239 | } |
| 238 | 240 | ||
diff --git a/src/video_core/textures/decoders.h b/src/video_core/textures/decoders.h index b390219e4..ba065510b 100644 --- a/src/video_core/textures/decoders.h +++ b/src/video_core/textures/decoders.h | |||
| @@ -19,8 +19,8 @@ inline std::size_t GetGOBSize() { | |||
| 19 | /** | 19 | /** |
| 20 | * Unswizzles a swizzled texture without changing its format. | 20 | * Unswizzles a swizzled texture without changing its format. |
| 21 | */ | 21 | */ |
| 22 | std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size, u32 bytes_per_pixel, u32 width, | 22 | std::vector<u8> UnswizzleTexture(VAddr address, u32 tile_size_x, u32 tile_size_y, |
| 23 | u32 height, u32 depth, | 23 | u32 bytes_per_pixel, u32 width, u32 height, u32 depth, |
| 24 | u32 block_height = TICEntry::DefaultBlockHeight, | 24 | u32 block_height = TICEntry::DefaultBlockHeight, |
| 25 | u32 block_depth = TICEntry::DefaultBlockHeight); | 25 | u32 block_depth = TICEntry::DefaultBlockHeight); |
| 26 | 26 | ||