summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/api
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-10-30 23:25:59 -0400
committerIlia Mirkin <[email protected]>2015-11-05 11:22:19 -0500
commit6706cc1671bfd8e6c021db8b68815959fa7fceba (patch)
treee226393229f409f35d5bd4d9676b21ec366f98b8 /src/gallium/state_trackers/clover/api
parentc93c9d220baa60fdd0e685a072a61857d3a2846b (diff)
st/clover: provide a path for drivers to call through to pfn_notify
Signed-off-by: Ilia Mirkin <[email protected]> [ Francisco Jerez: Clean up clover::context interface by passing around a function object. ]
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r--src/gallium/state_trackers/clover/api/context.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/context.cpp b/src/gallium/state_trackers/clover/api/context.cpp
index 021eea36f6e..c0cd2d32b95 100644
--- a/src/gallium/state_trackers/clover/api/context.cpp
+++ b/src/gallium/state_trackers/clover/api/context.cpp
@@ -45,8 +45,13 @@ clCreateContext(const cl_context_properties *d_props, cl_uint num_devs,
throw error(CL_INVALID_PROPERTY);
}
+ const auto notify = (!pfn_notify ? context::notify_action() :
+ [=](const char *s) {
+ pfn_notify(s, NULL, 0, user_data);
+ });
+
ret_error(r_errcode, CL_SUCCESS);
- return desc(new context(props, devs));
+ return desc(new context(props, devs, notify));
} catch (error &e) {
ret_error(r_errcode, e);