From 7958107bdccf17b6aea39bcc7993ddf663fcaf49 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 21 Jun 2018 14:21:45 +0100 Subject: [PATCH] Clear GL array texture data cache in ReplayLog * Otherwise the array data could be stale if we request the same array's data over again. --- renderdoc/driver/gl/gl_replay.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index 57aba30da..78c356fab 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -87,6 +87,13 @@ void GLReplay::ReplayLog(uint32_t endEventID, ReplayLogType replayType) { MakeCurrentReplayContext(&m_ReplayCtx); m_pDriver->ReplayLog(0, endEventID, replayType); + + // clear array cache + for(size_t i = 0; i < ARRAY_COUNT(m_GetTexturePrevData); i++) + { + delete[] m_GetTexturePrevData[i]; + m_GetTexturePrevData[i] = NULL; + } } const SDFile &GLReplay::GetStructuredFile()