From 871580dcd8433f2063693c69fe09b4abe6344ff0 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 14 Sep 2018 12:11:37 -0400 Subject: [PATCH] gl_rasterizer_cache: Implement LoadGLBuffer for Texture2DArray. --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 57af6cdd1..022561d43 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -679,6 +679,14 @@ void CachedSurface::LoadGLBuffer() { case SurfaceParams::SurfaceTarget::Texture2D: // Pass impl. to the fallback code below break; + case SurfaceParams::SurfaceTarget::Texture2DArray: + for (std::size_t index = 0; index < params.depth; ++index) { + const std::size_t offset{index * copy_size}; + morton_to_gl_fns[static_cast(params.pixel_format)]( + params.width, params.block_height, params.height, gl_buffer.data() + offset, + copy_size, params.addr + offset); + } + break; default: LOG_CRITICAL(HW_GPU, "Unimplemented tiled load for target={}", static_cast(params.target));