diff options
author | John Lynch <jlynch@sidefx.com> | 2021-01-21 04:14:31 +0300 |
---|---|---|
committer | John Lynch <jlynch@sidefx.com> | 2021-01-21 04:14:31 +0300 |
commit | 6c6c6caef07f18727bdb502cd80102d16cefd070 (patch) | |
tree | 83086ccc5c66b80c659df7f5e44d4bb517620010 | |
parent | 2eae80b9dc7d2b3de71c35329a2592b7ed11e770 (diff) |
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.
-rw-r--r-- | TracyOpenCL.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |