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.
This commit is contained in:
John Lynch 2021-01-20 19:14:31 -06:00
parent 2eae80b9dc
commit 6c6c6caef0

View File

@ -261,7 +261,8 @@ namespace tracy {
tracy_force_inline void SetEvent(cl_event event) tracy_force_inline void SetEvent(cl_event event)
{ {
m_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; m_ctx->GetQuery(m_beginQueryId).event = m_event;
} }