Просмотр исходного кода

LoadGLBuffer: Use bytes_per_pixel, not bits.

bunnei 8 лет назад
Родитель
Сommit
f61b9f7338
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/video_core/renderer_opengl/gl_rasterizer_cache.cpp

+ 2 - 1
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 {