From: Luo Xionghu <xionghu....@intel.com> this could fix the shoc project reported CL_PROFILING_INFO_NOT_AVAILABLE issue. https://github.com/vetter/shoc/issues/47 v2: per spec, the GetEventProfilingInfo need return CL_PROFILING_INFO_NOT_AVAILABLE if the event is not CL_COMPLETE, so the event should be updated in clFinish.
Signed-off-by: Luo Xionghu <xionghu....@intel.com> --- src/cl_command_queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c index 4e4ebfb..4b92311 100644 --- a/src/cl_command_queue.c +++ b/src/cl_command_queue.c @@ -276,6 +276,9 @@ LOCAL cl_int cl_command_queue_finish(cl_command_queue queue) { cl_gpgpu_sync(cl_get_thread_batch_buf(queue)); + cl_event last_event = get_last_event(queue); + if (last_event) + cl_event_update_status(last_event, 1); return CL_SUCCESS; } -- 1.9.1 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/beignet