From cfd2ab61212160c1162549ba257c4a3f0d287910 Mon Sep 17 00:00:00 2001 From: BreadFish64 Date: Fri, 28 Feb 2020 13:45:19 -0600 Subject: [PATCH] video_core: use explicit interval type in texture cache The default is discrete_interval which has dynamic open-ness. We only use right_open intervals anyway. In theory this could allow some compile-time optimizations. --- .../renderer_opengl/gl_rasterizer_cache.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index cd601ef29a..5581adb949 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -80,11 +80,15 @@ struct CachedSurface; using Surface = std::shared_ptr; using SurfaceSet = std::set; -using SurfaceRegions = boost::icl::interval_set; -using SurfaceMap = boost::icl::interval_map; -using SurfaceCache = boost::icl::interval_map; +using SurfaceInterval = boost::icl::right_open_interval; +using SurfaceRegions = boost::icl::interval_set; +using SurfaceMap = + boost::icl::interval_map; +using SurfaceCache = + boost::icl::interval_map; -using SurfaceInterval = SurfaceCache::interval_type; static_assert(std::is_same() && std::is_same(), "incorrect interval types"); @@ -245,7 +249,7 @@ struct SurfaceParams { } SurfaceInterval GetInterval() const { - return SurfaceInterval::right_open(addr, end); + return SurfaceInterval(addr, end); } // Returns the outer rectangle containing "interval"