summaryrefslogtreecommitdiff
path: root/src/gallium/targets/libgl-xlib/xlib.c
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsapountzis@gmail.com>2010-03-21 19:33:17 +0200
committerGeorge Sapountzis <gsapountzis@gmail.com>2010-03-21 19:33:17 +0200
commit15c7fa460b93039a1676cc08a218101f92681190 (patch)
tree2a4c4575736e8b51df0650154a2cce2640c777e1 /src/gallium/targets/libgl-xlib/xlib.c
parentf9c0cbd1ad0c5948ea577edb5c76b0c45976a285 (diff)
Revert "gallium: add soft screen helper"
This reverts commit f87a5f6499f51f651c2a9f2d4682875b22926905.
Diffstat (limited to 'src/gallium/targets/libgl-xlib/xlib.c')
-rw-r--r--src/gallium/targets/libgl-xlib/xlib.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c
index e786221210..48e79fe4f3 100644
--- a/src/gallium/targets/libgl-xlib/xlib.c
+++ b/src/gallium/targets/libgl-xlib/xlib.c
@@ -36,7 +36,6 @@
#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"
@@ -64,6 +63,8 @@ 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;
@@ -74,7 +75,36 @@ swrast_xlib_create_screen( Display *display )
if (winsys == NULL)
return NULL;
- screen = gallium_soft_create_screen( winsys );
+#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
if (screen == NULL)
goto fail;