diff options
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index f1b40e7f5..56c61b60c 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -320,13 +320,13 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat | |||
| 320 | std::size_t CalculateSize(bool tiled, u32 bytes_per_pixel, u32 width, u32 height, u32 depth, | 320 | std::size_t CalculateSize(bool tiled, u32 bytes_per_pixel, u32 width, u32 height, u32 depth, |
| 321 | u32 block_height, u32 block_depth) { | 321 | u32 block_height, u32 block_depth) { |
| 322 | if (tiled) { | 322 | if (tiled) { |
| 323 | const u32 gobs_in_x = 64 / bytes_per_pixel; | 323 | const u32 gobs_in_x = 64; |
| 324 | const u32 gobs_in_y = 8; | 324 | const u32 gobs_in_y = 8; |
| 325 | const u32 gobs_in_z = 1; | 325 | const u32 gobs_in_z = 1; |
| 326 | const u32 aligned_width = Common::AlignUp(width, gobs_in_x); | 326 | const u32 aligned_width = Common::AlignUp(width * bytes_per_pixel, gobs_in_x); |
| 327 | const u32 aligned_height = Common::AlignUp(height, gobs_in_y * block_height); | 327 | const u32 aligned_height = Common::AlignUp(height, gobs_in_y * block_height); |
| 328 | const u32 aligned_depth = Common::AlignUp(depth, gobs_in_z * block_depth); | 328 | const u32 aligned_depth = Common::AlignUp(depth, gobs_in_z * block_depth); |
| 329 | return aligned_width * aligned_height * aligned_depth * bytes_per_pixel; | 329 | return aligned_width * aligned_height * aligned_depth; |
| 330 | } else { | 330 | } else { |
| 331 | return width * height * depth * bytes_per_pixel; | 331 | return width * height * depth * bytes_per_pixel; |
| 332 | } | 332 | } |