summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-09-03 16:33:17 -0600
committerBrian Paul <[email protected]>2010-09-03 16:33:20 -0600
commitf1de38b851d274b16e8b58669a110b0124e0f40b (patch)
tree3db553fa40e59e0d1229611ccd7caa58cc71d842 /src/gallium/targets
parent14056e052b72a449cf3dc36932e44e434dd3c546 (diff)
libgl-xlib: enable galahad support
If the GALLIUM_GALAHAD env var is 1 we'll wrap the regular driver with the galahad validation driver.
Diffstat (limited to 'src/gallium/targets')
-rw-r--r--src/gallium/targets/libgl-xlib/Makefile3
-rw-r--r--src/gallium/targets/libgl-xlib/SConscript4
-rw-r--r--src/gallium/targets/libgl-xlib/xlib.c12
3 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index fe0541543ab..88cc0cca6a4 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -25,7 +25,8 @@ INCLUDE_DIRS = \
$(X11_CFLAGS)
DEFINES += \
- -DGALLIUM_SOFTPIPE
+ -DGALLIUM_SOFTPIPE \
+ -DGALLIUM_GALAHAD
#-DGALLIUM_CELL will be defined by the config */
XLIB_TARGET_SOURCES = \
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 88e216a65be..27b562e1d5d 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -48,6 +48,10 @@ if True:
env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
env.Prepend(LIBS = [softpipe])
+if True:
+ env.Append(CPPDEFINES = 'GALLIUM_GALAHAD')
+ env.Prepend(LIBS = [galahad])
+
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Tool('udis86')
diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c
index 5a9c80c8566..5914f63352a 100644
--- a/src/gallium/targets/libgl-xlib/xlib.c
+++ b/src/gallium/targets/libgl-xlib/xlib.c
@@ -78,6 +78,10 @@ st_api_create_OpenGL()
#include "cell/ppu/cell_public.h"
#endif
+#ifdef GALLIUM_GALAHAD
+#include "galahad/glhd_public.h"
+#endif
+
static struct pipe_screen *
swrast_create_screen(struct sw_winsys *winsys)
{
@@ -112,6 +116,14 @@ swrast_create_screen(struct sw_winsys *winsys)
screen = softpipe_create_screen( winsys );
#endif
+#if defined(GALLIUM_GALAHAD)
+ if (screen) {
+ struct pipe_screen *galahad_screen = galahad_screen_create(screen);
+ if (galahad_screen)
+ screen = galahad_screen;
+ }
+#endif
+
return screen;
}