summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover
diff options
context:
space:
mode:
authorAaron Watry <[email protected]>2017-08-03 20:55:18 -0500
committerAaron Watry <[email protected]>2017-08-15 19:55:15 -0500
commita8296dbd5a7d90a3a52e7a28fce5b8e8982efbeb (patch)
treea81455a5f1a7d8bf5d9d4c5e563e255d82566174 /src/gallium/state_trackers/clover
parent494f86bbe5b488f04390126d9988032194f82a2f (diff)
clover/event: Include additional event statuses for clSetEventCallback
From CL 2.0 Section 5.11 (Event Objects): clSetEventCallback returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors: ... CL_INVALID_VALUE if pfn_event_notify is NULL or if command_exec_callback_type is not CL_SUBMITTED , CL_RUNNING or CL_COMPLETE . Fixes: OpenCL CTS test_conformance/events/test_events callbacks Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r--src/gallium/state_trackers/clover/api/event.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/event.cpp b/src/gallium/state_trackers/clover/api/event.cpp
index 5d1a0e52c56..3f89644d0a4 100644
--- a/src/gallium/state_trackers/clover/api/event.cpp
+++ b/src/gallium/state_trackers/clover/api/event.cpp
@@ -126,7 +126,8 @@ clSetEventCallback(cl_event d_ev, cl_int type,
void *user_data) try {
auto &ev = obj(d_ev);
- if (!pfn_notify || type != CL_COMPLETE)
+ if (!pfn_notify ||
+ (type != CL_COMPLETE && type != CL_SUBMITTED && type != CL_RUNNING))
throw error(CL_INVALID_VALUE);
// Create a temporary soft event that depends on ev, with