From 1ff20d8538e7ed6a9121882afef4d73503667842 Mon Sep 17 00:00:00 2001 From: FernandoS27 Date: Sat, 13 Oct 2018 16:11:11 -0400 Subject: Fix a Crash on Zelda BotW and Splatoon 2, and simplified LoadGLBuffer --- src/video_core/textures/decoders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/textures') diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 6693067f8..5dab47886 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -271,7 +271,7 @@ u32 BytesPerPixel(TextureFormat format) { std::vector UnswizzleTexture(VAddr address, u32 tile_size, u32 bytes_per_pixel, u32 width, u32 height, u32 depth, u32 block_height, u32 block_depth) { - std::vector unswizzled_data(width * height * bytes_per_pixel); + std::vector 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); -- cgit v1.2.3