+/**
+ * Called by state tracker to specify a callback function the driver
+ * can use to report info back to the state tracker.
+ */
+static void
+svga_set_debug_callback(struct pipe_context *pipe,
+ const struct pipe_debug_callback *cb)
+{
+ struct svga_context *svga = svga_context(pipe);
+
+ if (cb) {
+ svga->debug.callback = *cb;
+ svga->swc->debug_callback = &svga->debug.callback;
+ } else {
+ memset(&svga->debug.callback, 0, sizeof(svga->debug.callback));
+ svga->swc->debug_callback = NULL;
+ }
+}
+