From 48f95c62b4699ff323ef969dbaa3dae6c25b141c Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Fri, 23 Dec 2005 20:59:50 +0000 Subject: [PATCH] Fix updates getting stuck in one priority level. It got stuck when the maximum updates is not reached. Therefore the next start update was not updated at all. --- panda/src/dxgsg9/lru.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/panda/src/dxgsg9/lru.cxx b/panda/src/dxgsg9/lru.cxx index 356ec451c9..0eaa7ec13c 100644 --- a/panda/src/dxgsg9/lru.cxx +++ b/panda/src/dxgsg9/lru.cxx @@ -861,7 +861,7 @@ void Lru::partial_lru_update (int maximum_updates) if (total_page_updates < maximum_updates) { - for (index = 0; index < start_priority; index++) + for (index = 0; index <= start_priority; index++) { LruPage *next_lru_page; @@ -907,6 +907,12 @@ void Lru::partial_lru_update (int maximum_updates) } } + if (total_page_updates < maximum_updates) + { + this -> _m.start_priority_index = 0; + this -> _m.start_update_lru_page = 0; + } + this -> update_page_priorities ( ); } }