diff options
Diffstat (limited to 'src/gallium/targets/libgl-xlib')
-rw-r--r-- | src/gallium/targets/libgl-xlib/Makefile | 20 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/SConscript | 7 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/xlib.c | 21 |
3 files changed, 36 insertions, 12 deletions
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile index add3a273945..79e516a2a7a 100644 --- a/src/gallium/targets/libgl-xlib/Makefile +++ b/src/gallium/targets/libgl-xlib/Makefile @@ -15,6 +15,7 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY) INCLUDE_DIRS = \ -I$(TOP)/include \ + -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa \ -I$(TOP)/src/mesa/main \ -I$(TOP)/src/gallium/include \ @@ -24,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 = \ @@ -41,13 +43,22 @@ LIBS = \ $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \ $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \ $(TOP)/src/gallium/drivers/trace/libtrace.a \ + $(TOP)/src/gallium/drivers/rbug/librbug.a \ $(TOP)/src/gallium/drivers/identity/libidentity.a \ - $(TOP)/src/mesa/libglapi.a \ + $(TOP)/src/mapi/glapi/libglapi.a \ $(TOP)/src/mesa/libmesagallium.a \ $(GALLIUM_AUXILIARIES) \ $(CELL_SPU_LIB) \ +# LLVM +ifeq ($(MESA_LLVM),1) +DEFINES += -DGALLIUM_LLVMPIPE +GL_LIB_DEPS += $(LLVM_LIBS) +LDFLAGS += $(LLVM_LDFLAGS) +endif + + .SUFFIXES : .cpp .c.o: @@ -66,8 +77,9 @@ $(TOP)/$(LIB_DIR)/gallium: # Make the libGL.so library $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_TARGET_OBJECTS) $(LIBS) Makefile $(TOP)/bin/mklib -o $(GL_LIB) \ - -linker "$(CC)" \ + -linker "$(CXX)" -ldflags '$(LDFLAGS)' \ -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \ + -cplusplus \ -install $(TOP)/$(LIB_DIR)/gallium \ $(MKLIB_OPTIONS) $(XLIB_TARGET_OBJECTS) \ -Wl,--start-group $(LIBS) -Wl,--end-group $(GL_LIB_DEPS) @@ -95,7 +107,7 @@ tags: etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h clean: - -rm -f *.o + -rm -f *.o depend include depend diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript index 63e4531263a..27b562e1d5d 100644 --- a/src/gallium/targets/libgl-xlib/SConscript +++ b/src/gallium/targets/libgl-xlib/SConscript @@ -17,6 +17,7 @@ if env['dri']: env = env.Clone() env.Append(CPPPATH = [ + '#/src/mapi', '#/src/mesa', '#/src/mesa/main', '#src/gallium/state_trackers/glx/xlib', @@ -28,11 +29,13 @@ env.Prepend(LIBS = [ st_xlib, ws_xlib, trace, + rbug, identity, glapi, mesa, glsl, gallium, + 'talloc' ]) sources = [ @@ -45,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 69b4ddd33f7..2f8cd2d404a 100644 --- a/src/gallium/targets/libgl-xlib/xlib.c +++ b/src/gallium/targets/libgl-xlib/xlib.c @@ -36,16 +36,9 @@ #include "state_tracker/xlib_sw_winsys.h" #include "xm_public.h" +#include "state_tracker/st_api.h" #include "state_tracker/st_gl_api.h" -/* piggy back on this libGL for OpenGL support in EGL */ -struct st_api * -st_api_create_OpenGL() -{ - return st_gl_api_create(); -} - - /* Helper function to choose and instantiate one of the software rasterizers: * cell, llvmpipe, softpipe. * @@ -77,6 +70,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) { @@ -111,6 +108,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; } |