diff options
author | George Sapountzis <[email protected]> | 2010-03-19 02:38:11 +0200 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2010-03-21 13:21:46 +0200 |
commit | f87a5f6499f51f651c2a9f2d4682875b22926905 (patch) | |
tree | 700f75997c24ecfca2728c6a0e65bfaf7e960f4f /src/gallium/targets | |
parent | c28f5f98d6d57d3dd74fc6c1205a36ed584d1c93 (diff) |
gallium: add soft screen helper
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/libgl-xlib/Makefile | 1 | ||||
l--------- | src/gallium/targets/libgl-xlib/soft_screen.c | 1 | ||||
-rw-r--r-- | src/gallium/targets/libgl-xlib/xlib.c | 34 |
3 files changed, 4 insertions, 32 deletions
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile index 5a4e035c2eb..2c44a62102e 100644 --- a/src/gallium/targets/libgl-xlib/Makefile +++ b/src/gallium/targets/libgl-xlib/Makefile @@ -27,6 +27,7 @@ DEFINES += \ #-DGALLIUM_CELL will be defined by the config */ XLIB_TARGET_SOURCES = \ + soft_screen.c \ xlib.c diff --git a/src/gallium/targets/libgl-xlib/soft_screen.c b/src/gallium/targets/libgl-xlib/soft_screen.c new file mode 120000 index 00000000000..d6d878f3658 --- /dev/null +++ b/src/gallium/targets/libgl-xlib/soft_screen.c @@ -0,0 +1 @@ +../../auxiliary/target-helpers/soft_screen.c
\ No newline at end of file diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c index 48e79fe4f3b..e7862212106 100644 --- a/src/gallium/targets/libgl-xlib/xlib.c +++ b/src/gallium/targets/libgl-xlib/xlib.c @@ -36,6 +36,7 @@ #include "softpipe/sp_public.h" #include "llvmpipe/lp_public.h" #include "cell/ppu/cell_public.h" +#include "target-helpers/soft_screen.h" #include "target-helpers/wrap_screen.h" #include "xm_public.h" @@ -63,8 +64,6 @@ PUBLIC const struct st_module st_module_OpenGL = { static struct pipe_screen * swrast_xlib_create_screen( Display *display ) { - const char *default_driver; - const char *driver; struct sw_winsys *winsys; struct pipe_screen *screen = NULL; @@ -75,36 +74,7 @@ swrast_xlib_create_screen( Display *display ) if (winsys == NULL) return NULL; -#if defined(GALLIUM_CELL) - default_driver = "cell"; -#elif defined(GALLIUM_LLVMPIPE) - default_driver = "llvmpipe"; -#elif defined(GALLIUM_SOFTPIPE) - default_driver = "softpipe"; -#else - default_driver = ""; -#endif - - driver = debug_get_option("GALLIUM_DRIVER", default_driver); - - /* Create a software rasterizer on top of that winsys: - */ -#if defined(GALLIUM_CELL) - if (screen == NULL && - strcmp(driver, "cell") == 0) - screen = cell_create_screen( winsys ); -#endif - -#if defined(GALLIUM_LLVMPIPE) - if (screen == NULL && - strcmp(driver, "llvmpipe") == 0) - screen = llvmpipe_create_screen( winsys ); -#endif - -#if defined(GALLIUM_SOFTPIPE) - if (screen == NULL) - screen = softpipe_create_screen( winsys ); -#endif + screen = gallium_soft_create_screen( winsys ); if (screen == NULL) goto fail; |