mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #5111 from BreadFish64/interval
video_core: use explicit interval type in texture cache
This commit is contained in:
		
						commit
						ab8cb17ab7
					
				
					 1 changed files with 9 additions and 5 deletions
				
			
		|  | @ -80,11 +80,15 @@ struct CachedSurface; | ||||||
| using Surface = std::shared_ptr<CachedSurface>; | using Surface = std::shared_ptr<CachedSurface>; | ||||||
| using SurfaceSet = std::set<Surface>; | using SurfaceSet = std::set<Surface>; | ||||||
| 
 | 
 | ||||||
| using SurfaceRegions = boost::icl::interval_set<PAddr>; | using SurfaceInterval = boost::icl::right_open_interval<PAddr>; | ||||||
| using SurfaceMap = boost::icl::interval_map<PAddr, Surface>; | using SurfaceRegions = boost::icl::interval_set<PAddr, std::less, SurfaceInterval>; | ||||||
| using SurfaceCache = boost::icl::interval_map<PAddr, SurfaceSet>; | using SurfaceMap = | ||||||
|  |     boost::icl::interval_map<PAddr, Surface, boost::icl::partial_absorber, std::less, | ||||||
|  |                              boost::icl::inplace_plus, boost::icl::inter_section, SurfaceInterval>; | ||||||
|  | using SurfaceCache = | ||||||
|  |     boost::icl::interval_map<PAddr, SurfaceSet, boost::icl::partial_absorber, std::less, | ||||||
|  |                              boost::icl::inplace_plus, boost::icl::inter_section, SurfaceInterval>; | ||||||
| 
 | 
 | ||||||
| using SurfaceInterval = SurfaceCache::interval_type; |  | ||||||
| static_assert(std::is_same<SurfaceRegions::interval_type, SurfaceCache::interval_type>() && | static_assert(std::is_same<SurfaceRegions::interval_type, SurfaceCache::interval_type>() && | ||||||
|                   std::is_same<SurfaceMap::interval_type, SurfaceCache::interval_type>(), |                   std::is_same<SurfaceMap::interval_type, SurfaceCache::interval_type>(), | ||||||
|               "incorrect interval types"); |               "incorrect interval types"); | ||||||
|  | @ -249,7 +253,7 @@ public: | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     SurfaceInterval GetInterval() const { |     SurfaceInterval GetInterval() const { | ||||||
|         return SurfaceInterval::right_open(addr, end); |         return SurfaceInterval(addr, end); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Returns the outer rectangle containing "interval"
 |     // Returns the outer rectangle containing "interval"
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue