summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-01-19 15:41:46 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit8097dc9dd951f8631d0839315914f36769bd6e7e (patch)
treeac2b06946f40d99a6dfdd56e91333162a97a2b96 /src/gallium
parent6c7a27647079402494589b9ba99a9629618379c0 (diff)
iris: shader debug log
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_screen.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index d1b4d443363..432f5741239 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -464,6 +464,23 @@ iris_getparam_integer(struct iris_screen *screen, int param)
return -1;
}
+static void
+iris_shader_debug_log(void *data, const char *fmt, ...)
+{
+ // XXX: is data ice?
+ struct iris_context *ice = data;
+ struct pipe_debug_callback *dbg = &ice->dbg;
+ unsigned msg_id = 0;
+ va_list args;
+
+ if (!dbg->debug_message)
+ return;
+
+ va_start(args, fmt);
+ dbg->debug_message(ice, &msg_id, PIPE_DEBUG_TYPE_SHADER_INFO, fmt, args);
+ va_end(args);
+}
+
struct pipe_screen *
iris_screen_create(int fd)
{
@@ -485,6 +502,7 @@ iris_screen_create(int fd)
isl_device_init(&screen->isl_dev, &screen->devinfo, hw_has_swizzling);
screen->compiler = brw_compiler_create(screen, &screen->devinfo);
+ screen->compiler->shader_debug_log = iris_shader_debug_log;
struct pipe_screen *pscreen = &screen->base;