*/
struct pipe_debug_callback
{
+ /**
+ * When set to \c true, the callback may be called asynchronously from a
+ * driver-created thread.
+ */
+ bool async;
+
/**
* Callback for the driver to report debug/performance/etc information back
* to the state tracker.
throw error(CL_INVALID_DEVICE);
if (ctx.notify) {
- struct pipe_debug_callback cb = { &debug_notify_callback, this };
+ struct pipe_debug_callback cb;
+ memset(&cb, 0, sizeof(cb));
+ cb.debug_message = &debug_notify_callback;
+ cb.data = this;
if (pipe->set_debug_callback)
pipe->set_debug_callback(pipe, &cb);
}
return;
if (enable) {
- struct pipe_debug_callback cb = { st_debug_message, st };
+ struct pipe_debug_callback cb;
+ memset(&cb, 0, sizeof(cb));
+ cb.debug_message = st_debug_message;
+ cb.data = st;
pipe->set_debug_callback(pipe, &cb);
} else {
pipe->set_debug_callback(pipe, NULL);