Mesa (master): glhd: Re-integrate with the debug system
Jakob Bornecrantz
wallbraker at kemper.freedesktop.org
Mon Jun 28 20:34:31 UTC 2010
Module: Mesa
Branch: master
Commit: d12c4c5a62dbf5e32f989c8ef53a5a878cc5c0a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d12c4c5a62dbf5e32f989c8ef53a5a878cc5c0a2
Author: Jakob Bornecrantz <jakob at vmware.com>
Date: Mon Jun 28 21:50:51 2010 +0200
glhd: Re-integrate with the debug system
---
.../auxiliary/target-helpers/inline_debug_helper.h | 8 ++++++++
src/gallium/drivers/galahad/glhd_screen.c | 6 +++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
index 1bc329c..0433da6 100644
--- a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h
@@ -18,6 +18,10 @@
#include "rbug/rbug_public.h"
#endif
+#ifdef GALLIUM_GALAHAD
+#include "galahad/glhd_public.h"
+#endif
+
static INLINE struct pipe_screen *
debug_screen_wrap(struct pipe_screen *screen)
{
@@ -30,6 +34,10 @@ debug_screen_wrap(struct pipe_screen *screen)
screen = trace_screen_create(screen);
#endif
+#if defined(GALLIUM_GALAHAD)
+ screen = galahad_screen_create(screen);
+#endif
+
return screen;
}
diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c
index bcc37cb..4117485 100644
--- a/src/gallium/drivers/galahad/glhd_screen.c
+++ b/src/gallium/drivers/galahad/glhd_screen.c
@@ -36,6 +36,7 @@
#include "glhd_context.h"
#include "glhd_objects.h"
+DEBUG_GET_ONCE_BOOL_OPTION(galahad, "GALLIUM_GALAHAD", FALSE)
static void
galahad_screen_destroy(struct pipe_screen *_screen)
@@ -298,9 +299,12 @@ galahad_screen_create(struct pipe_screen *screen)
{
struct galahad_screen *glhd_screen;
+ if (!debug_get_option_galahad())
+ return screen;
+
glhd_screen = CALLOC_STRUCT(galahad_screen);
if (!glhd_screen) {
- return NULL;
+ return screen;
}
glhd_screen->base.winsys = NULL;
More information about the mesa-commit
mailing list