libgl-xlib: enable galahad support

If the GALLIUM_GALAHAD env var is 1 we'll wrap the regular driver with
the galahad validation driver.
This commit is contained in:
Brian Paul
2010-09-03 16:33:17 -06:00
parent 14056e052b
commit f1de38b851
3 changed files with 18 additions and 1 deletions

View File

@@ -25,7 +25,8 @@ INCLUDE_DIRS = \
$(X11_CFLAGS) $(X11_CFLAGS)
DEFINES += \ DEFINES += \
-DGALLIUM_SOFTPIPE -DGALLIUM_SOFTPIPE \
-DGALLIUM_GALAHAD
#-DGALLIUM_CELL will be defined by the config */ #-DGALLIUM_CELL will be defined by the config */
XLIB_TARGET_SOURCES = \ XLIB_TARGET_SOURCES = \

View File

@@ -48,6 +48,10 @@ if True:
env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE') env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
env.Prepend(LIBS = [softpipe]) env.Prepend(LIBS = [softpipe])
if True:
env.Append(CPPDEFINES = 'GALLIUM_GALAHAD')
env.Prepend(LIBS = [galahad])
if env['llvm']: if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE') env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Tool('udis86') env.Tool('udis86')

View File

@@ -78,6 +78,10 @@ st_api_create_OpenGL()
#include "cell/ppu/cell_public.h" #include "cell/ppu/cell_public.h"
#endif #endif
#ifdef GALLIUM_GALAHAD
#include "galahad/glhd_public.h"
#endif
static struct pipe_screen * static struct pipe_screen *
swrast_create_screen(struct sw_winsys *winsys) swrast_create_screen(struct sw_winsys *winsys)
{ {
@@ -112,6 +116,14 @@ swrast_create_screen(struct sw_winsys *winsys)
screen = softpipe_create_screen( winsys ); screen = softpipe_create_screen( winsys );
#endif #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; return screen;
} }