1 #include "pipe/p_compiler.h"
2 #include "util/u_debug.h"
3 #include "target-helpers/wrap_screen.h"
7 /* Helper function to choose and instantiate one of the software rasterizers:
8 * cell, llvmpipe, softpipe.
11 #ifdef GALLIUM_SOFTPIPE
12 #include "softpipe/sp_public.h"
15 #ifdef GALLIUM_LLVMPIPE
16 #include "llvmpipe/lp_public.h"
20 #include "cell/ppu/cell_public.h"
24 swrast_create_screen(struct sw_winsys
*winsys
)
26 const char *default_driver
;
28 struct pipe_screen
*screen
= NULL
;
30 #if defined(GALLIUM_CELL)
31 default_driver
= "cell";
32 #elif defined(GALLIUM_LLVMPIPE)
33 default_driver
= "llvmpipe";
34 #elif defined(GALLIUM_SOFTPIPE)
35 default_driver
= "softpipe";
40 driver
= debug_get_option("GALLIUM_DRIVER", default_driver
);
42 #if defined(GALLIUM_CELL)
43 if (screen
== NULL
&& strcmp(driver
, "cell") == 0)
44 screen
= cell_create_screen( winsys
);
47 #if defined(GALLIUM_LLVMPIPE)
48 if (screen
== NULL
&& strcmp(driver
, "llvmpipe") == 0)
49 screen
= llvmpipe_create_screen( winsys
);
52 #if defined(GALLIUM_SOFTPIPE)
54 screen
= softpipe_create_screen( winsys
);