From 6c6c6caef07f18727bdb502cd80102d16cefd070 Mon Sep 17 00:00:00 2001 From: John Lynch Date: Wed, 20 Jan 2021 19:14:31 -0600 Subject: [PATCH] In OpenCLCtxScope::SetEvent, the necessary clRetainEvent call was inside an assert, thus never called if NDEBUG was defined. This change asserts only on the return value of the function, as in other parts of the code. --- TracyOpenCL.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TracyOpenCL.hpp b/TracyOpenCL.hpp index 8f344c91..94aa1162 100644 --- a/TracyOpenCL.hpp +++ b/TracyOpenCL.hpp @@ -261,7 +261,8 @@ namespace tracy { tracy_force_inline void SetEvent(cl_event event) { m_event = event; - assert(clRetainEvent(m_event) == CL_SUCCESS); + cl_int err = clRetainEvent(m_event); + assert(err == CL_SUCCESS); m_ctx->GetQuery(m_beginQueryId).event = m_event; }