Viewport: Add debug flag to disable landscape cache

This commit is contained in:
Jonathan G Rennison
2020-10-03 16:01:59 +01:00
parent bfc26a0180
commit 2c4808e239

View File

@@ -328,6 +328,7 @@ enum ViewportDebugFlags {
VDF_DIRTY_BLOCK_PER_SPLIT, VDF_DIRTY_BLOCK_PER_SPLIT,
VDF_DISABLE_DRAW_SPLIT, VDF_DISABLE_DRAW_SPLIT,
VDF_SHOW_NO_LANDSCAPE_MAP_DRAW, VDF_SHOW_NO_LANDSCAPE_MAP_DRAW,
VDF_DISABLE_LANDSCAPE_CACHE,
}; };
uint32 _viewport_debug_flags; uint32 _viewport_debug_flags;
@@ -357,6 +358,11 @@ void ClearViewportCaches()
for (Viewport *vp : _viewport_window_cache) { for (Viewport *vp : _viewport_window_cache) {
ClearViewportCache(vp); ClearViewportCache(vp);
} }
if (unlikely(HasBit(_viewport_debug_flags, VDF_DISABLE_LANDSCAPE_CACHE))) {
for (Viewport *vp : _viewport_window_cache) {
ClearViewportLandPixelCache(vp);
}
}
} }
void DeleteWindowViewport(Window *w) void DeleteWindowViewport(Window *w)