Przeglądaj źródła

Merge pull request #2372 from FernandoS27/fermi-fix

Correct Fermi Copy on Linear Textures.
bunnei 7 lat temu
rodzic
commit
0371650bd7

+ 4 - 0
src/video_core/renderer_opengl/gl_rasterizer_cache.cpp

@@ -266,6 +266,10 @@ std::size_t SurfaceParams::InnerMemorySize(bool force_gl, bool layer_only,
     params.component_type = ComponentTypeFromRenderTarget(config.format);
     params.component_type = ComponentTypeFromRenderTarget(config.format);
     params.type = GetFormatType(params.pixel_format);
     params.type = GetFormatType(params.pixel_format);
     params.width = config.width;
     params.width = config.width;
+    if (!params.is_tiled) {
+        const u32 bpp = params.GetFormatBpp() / 8;
+        params.pitch = config.width * bpp;
+    }
     params.height = config.height;
     params.height = config.height;
     params.unaligned_height = config.height;
     params.unaligned_height = config.height;
     params.target = SurfaceTarget::Texture2D;
     params.target = SurfaceTarget::Texture2D;