From f61b9f7338b0f3667f605a399c6a1501e621b3a0 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 22 Mar 2018 23:01:57 -0400 Subject: LoadGLBuffer: Use bytes_per_pixel, not bits. --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 175f329e3..19fb2333a 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -546,7 +546,8 @@ void CachedSurface::LoadGLBuffer(VAddr load_start, VAddr load_end) { if (!is_tiled) { ASSERT(type == SurfaceType::Color); - VideoCore::MortonCopyPixels128(width, height, GetFormatBpp(), 4, + const u32 bytes_per_pixel{GetFormatBpp() >> 3}; + VideoCore::MortonCopyPixels128(width, height, bytes_per_pixel, 4, texture_src_data + start_offset, &gl_buffer[start_offset], true); } else { -- cgit v1.2.3