summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/clover/api/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/clover/api/context.cpp')
-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 021eea36f6..c0cd2d32b9 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);