mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	gl_rasterizer_cache: Remove all fully invalid surfaces from the cache
Some games (e.g. Pilotwings Resort) create many surfaces that are invalidated quickly but were never removed. This occasionally lead to large lag spikes due to high lookup times and other data structure management overhead.
This commit is contained in:
		
							parent
							
								
									8df502a688
								
							
						
					
					
						commit
						935e88a580
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -1858,9 +1858,9 @@ void RasterizerCacheOpenGL::InvalidateRegion(PAddr addr, u32 size, const Surface | |||
|             cached_surface->invalid_regions.insert(interval); | ||||
|             cached_surface->InvalidateAllWatcher(); | ||||
| 
 | ||||
|             // Remove only "empty" fill surfaces to avoid destroying and recreating OGL textures
 | ||||
|             if (cached_surface->type == SurfaceType::Fill && | ||||
|                 cached_surface->IsSurfaceFullyInvalid()) { | ||||
|             // If the surface has no salvageable data it should be removed from the cache to avoid
 | ||||
|             // clogging the data structure
 | ||||
|             if (cached_surface->IsSurfaceFullyInvalid()) { | ||||
|                 remove_surfaces.emplace(cached_surface); | ||||
|             } | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue