aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/OpenClTimer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/cl/OpenClTimer.cpp')
-rw-r--r--src/backends/cl/OpenClTimer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backends/cl/OpenClTimer.cpp b/src/backends/cl/OpenClTimer.cpp
index 5f106993ec..a4958c10e0 100644
--- a/src/backends/cl/OpenClTimer.cpp
+++ b/src/backends/cl/OpenClTimer.cpp
@@ -66,6 +66,13 @@ void OpenClTimer::Start()
// Store the Kernel info for later GetMeasurements() call
m_Kernels.emplace_back(ss.str(), customEvent);
+ if(event != nullptr)
+ {
+ //return cl_event from the intercepted call
+ clRetainEvent(customEvent);
+ *event = customEvent;
+ }
+
return retVal;
};