From bc77e166538a23f19e6fd0f98a8b02634b7ea8b5 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sat, 11 Feb 2023 17:54:42 +0200 Subject: [PATCH] rasterizer_cache: Check levels when finding exact match * Fixes validation errors in multiple games --- src/video_core/rasterizer_cache/surface_params.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video_core/rasterizer_cache/surface_params.cpp b/src/video_core/rasterizer_cache/surface_params.cpp index 8b4820b78..faa281404 100644 --- a/src/video_core/rasterizer_cache/surface_params.cpp +++ b/src/video_core/rasterizer_cache/surface_params.cpp @@ -9,8 +9,9 @@ namespace VideoCore { bool SurfaceParams::ExactMatch(const SurfaceParams& other_surface) const { return std::tie(other_surface.addr, other_surface.width, other_surface.height, - other_surface.stride, other_surface.pixel_format, other_surface.is_tiled) == - std::tie(addr, width, height, stride, pixel_format, is_tiled) && + other_surface.stride, other_surface.pixel_format, other_surface.is_tiled, + other_surface.levels) == + std::tie(addr, width, height, stride, pixel_format, is_tiled, levels) && pixel_format != PixelFormat::Invalid; }