From db21154142e8f2f814058907ed29d914286fb7c6 Mon Sep 17 00:00:00 2001 From: Phantom Date: Mon, 29 Jan 2018 00:50:47 +0100 Subject: [PATCH] GetFramebufferSurfaces: Remove an assert that is no longer correct --- src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index d51ac5b1e..8a77133fd 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -971,6 +971,8 @@ Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params, ScaleMatc // Use GetSurfaceSubRect instead ASSERT(params.width == params.stride); + ASSERT(!params.is_tiled || (params.width % 8 == 0 && params.height % 8 == 0)); + // Check for an exact match in existing surfaces Surface surface = FindMatch(surface_cache, params, match_res_scale); @@ -1178,8 +1180,8 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( if (color_surface != nullptr && depth_surface != nullptr) { fb_rect = color_rect; // Color and Depth surfaces must have the same dimensions and offsets - if (color_rect.bottom != depth_rect.bottom || - color_surface->height != depth_surface->height) { + if (color_rect.bottom != depth_rect.bottom || color_rect.top != depth_rect.top || + color_rect.left != depth_rect.left || color_rect.right != depth_rect.right) { color_surface = GetSurface(color_params, ScaleMatch::Exact, false); depth_surface = GetSurface(depth_params, ScaleMatch::Exact, false); fb_rect = color_surface->GetScaledRect(); @@ -1189,7 +1191,6 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces( } else if (depth_surface != nullptr) { fb_rect = depth_rect; } - ASSERT(!fb_rect.left && fb_rect.right == config.GetWidth() * resolution_scale_factor); if (color_surface != nullptr) { ValidateSurface(color_surface, boost::icl::first(color_vp_interval),