1 #include "pipe/p_compiler.h"
2 #include "util/u_debug.h"
3 #include "util/u_memory.h"
4 #include "target-helpers/wrap_screen.h"
5 #include "sw/null/null_sw_winsys.h"
6 #include "os/os_time.h"
7 #include "state_tracker/graw.h"
9 #ifdef GALLIUM_SOFTPIPE
10 #include "softpipe/sp_public.h"
13 #ifdef GALLIUM_LLVMPIPE
14 #include "llvmpipe/lp_public.h"
17 /* Haven't figured out a decent way to build the helper code yet -
18 * #include it here temporarily.
20 #include "sw/sw_public.h"
33 graw_create_window_and_screen( int x
,
37 enum pipe_format format
,
40 const char *default_driver
;
42 struct pipe_screen
*screen
= NULL
;
43 struct sw_winsys
*winsys
= NULL
;
47 /* Create the underlying winsys, which performs presents to Xlib
50 winsys
= null_sw_create();
54 #if defined(GALLIUM_LLVMPIPE)
55 default_driver
= "llvmpipe";
56 #elif defined(GALLIUM_SOFTPIPE)
57 default_driver
= "softpipe";
62 driver
= debug_get_option("GALLIUM_DRIVER", default_driver
);
64 #if defined(GALLIUM_LLVMPIPE)
65 if (screen
== NULL
&& strcmp(driver
, "llvmpipe") == 0)
66 screen
= llvmpipe_create_screen( winsys
);
69 #if defined(GALLIUM_SOFTPIPE)
71 screen
= softpipe_create_screen( winsys
);
76 /* Inject any wrapping layers we want to here:
78 return gallium_wrap_screen( screen
);
84 graw_set_display_func( void (*draw
)( void ) )
91 graw_main_loop( void )
94 os_time_sleep(100000);