+static void
+init_logging(struct pipe_screen *screen)
+{
+ static const char *log_prefix = "Mesa: ";
+ char host_log[1000];
+
+ /* Log Version to Host */
+ util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix),
+ "%s%s", log_prefix, svga_get_name(screen));
+ svga_host_log(host_log);
+
+ util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix),
+ "%s%s (%s)", log_prefix, PACKAGE_VERSION, MESA_GIT_SHA1);
+ svga_host_log(host_log);
+
+ /* If the SVGA_EXTRA_LOGGING env var is set, log the process's command
+ * line (program name and arguments).
+ */
+ if (debug_get_bool_option("SVGA_EXTRA_LOGGING", FALSE)) {
+ char cmdline[1000];
+ if (os_get_command_line(cmdline, sizeof(cmdline))) {
+ util_snprintf(host_log, sizeof(host_log) - strlen(log_prefix),
+ "%s%s", log_prefix, cmdline);
+ svga_host_log(host_log);
+ }
+ }
+}
+
+