From 9df369ecc478e50d0e1dba54b244504eace47ad5 Mon Sep 17 00:00:00 2001 From: John Lynch Date: Thu, 21 Jan 2021 12:27:26 -0600 Subject: [PATCH] Move call to clRetainEvent outside of assert within OpenCLCtx::collect, ensuring it is still called when NDEBUG is defined. --- TracyOpenCL.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TracyOpenCL.hpp b/TracyOpenCL.hpp index 94aa1162..6190f802 100644 --- a/TracyOpenCL.hpp +++ b/TracyOpenCL.hpp @@ -125,7 +125,8 @@ namespace tracy { if (eventInfo.phase == EventPhase::End) { // Done with the event, so release it - assert(clReleaseEvent(event) == CL_SUCCESS); + err = clReleaseEvent(event); + assert(err == CL_SUCCESS); } m_tail = (m_tail + 1) % QueryCount;