From 5ae5cb8bcf1920006663398da70a160ef04d9562 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 1 Oct 2020 10:41:53 +0100 Subject: [PATCH] Don't remove resource records for stale resources on GL * If we destroy a resource e.g. FBO 4 in a captured frame, its record will stay alive until the end. When we delete that record we don't want to remove the record that is now recorded for FBO 4 since that might be a new resource that has been created. If the ID doesn't match then the original resource destruction has already been processed and the record is now orphaned, so nothing has to happen. --- renderdoc/driver/gl/gl_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/gl/gl_manager.h b/renderdoc/driver/gl/gl_manager.h index 1da638eaf..7ac6c10e6 100644 --- a/renderdoc/driver/gl/gl_manager.h +++ b/renderdoc/driver/gl/gl_manager.h @@ -138,7 +138,7 @@ public: if(record) { auto it = m_CurrentResources.find(record->Resource); - if(it != m_CurrentResources.end()) + if(it != m_CurrentResources.end() && it->second.first == id) it->second.second = NULL; }