diff options
author | Ilia Mirkin <[email protected]> | 2015-10-30 17:23:22 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-11-05 11:22:19 -0500 |
commit | 4335b28840be53ad3c230a4f2dfc2262bf56a0a7 (patch) | |
tree | 14d6d39d0568d859c0974982bec43785e2dc3139 /src/gallium/drivers/nouveau/nouveau_screen.c | |
parent | 6706cc1671bfd8e6c021db8b68815959fa7fceba (diff) |
nouveau: add support for sending debug messages via KHR_debug
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_screen.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_screen.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 47603b0b7fd..21d431788ec 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -18,6 +18,7 @@ #include "nouveau_winsys.h" #include "nouveau_screen.h" +#include "nouveau_context.h" #include "nouveau_fence.h" #include "nouveau_mm.h" #include "nouveau_buffer.h" @@ -238,3 +239,21 @@ nouveau_screen_fini(struct nouveau_screen *screen) nouveau_device_del(&screen->device); } + +static void +nouveau_set_debug_callback(struct pipe_context *pipe, + const struct pipe_debug_callback *cb) +{ + struct nouveau_context *context = nouveau_context(pipe); + + if (cb) + context->debug = *cb; + else + memset(&context->debug, 0, sizeof(context->debug)); +} + +void +nouveau_context_init(struct nouveau_context *context) +{ + context->pipe.set_debug_callback = nouveau_set_debug_callback; +} |