diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-13 22:11:11 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-13 22:11:11 +0200 |
commit | 1ff20d8538e7ed6a9121882afef4d73503667842 (patch) | |
tree | 16fcec0f19cb1bf7b64dd1754108114cc73df98d /src/video_core | |
parent | Propagate depth and depth_block on modules using decoders (diff) | |
download | yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar.gz yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar.bz2 yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar.lz yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar.xz yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.tar.zst yuzu-1ff20d8538e7ed6a9121882afef4d73503667842.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 19 | ||||
-rw-r--r-- | src/video_core/textures/decoders.cpp | 2 |
2 files changed, 2 insertions, 19 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 86cb62dae..8fdb59b5b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -833,27 +833,10 @@ void CachedSurface::LoadGLBuffer() { ASSERT_MSG(params.block_width == 1, "Block width is defined as {} on texture type {}", params.block_width, static_cast<u32>(params.target)); - switch (params.target) { - case SurfaceParams::SurfaceTarget::Texture2D: + if (params.target == SurfaceParams::SurfaceTarget::Texture2D) { // TODO(Blinkhawk): Eliminate this condition once all texture types are implemented. depth = 1U; block_depth = 1U; - break; - case SurfaceParams::SurfaceTarget::Texture2DArray: - case SurfaceParams::SurfaceTarget::TextureCubemap: - depth = 1U; - block_depth = 1U; - for (std::size_t index = 0; index < params.depth; ++index) { - const std::size_t offset{index * copy_size}; - morton_to_gl_fns[static_cast<std::size_t>(params.pixel_format)]( - params.width, params.block_height, params.height, 1U, 1U, - gl_buffer.data() + offset, copy_size, params.addr + offset); - } - break; - default: - LOG_CRITICAL(HW_GPU, "Unimplemented tiled load for target={}", - static_cast<u32>(params.target)); - UNREACHABLE(); } const std::size_t size = copy_size * depth; 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<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> unswizzled_data(width * height * bytes_per_pixel); + 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); |