1
2#include "target-helpers/inline_sw_helper.h"
3#include "target-helpers/inline_debug_helper.h"
4#include "state_tracker/sw_driver.h"
5#include "sw/dri/dri_sw_winsys.h"
6#include "sw/kms-dri/kms_dri_sw_winsys.h"
7#include "sw/null/null_sw_winsys.h"
8#include "sw/wrapper/wrapper_sw_winsys.h"
9
10PUBLIC struct pipe_screen *
11swrast_create_screen(struct sw_winsys *ws);
12
13struct pipe_screen *
14swrast_create_screen(struct sw_winsys *ws)
15{
16   struct pipe_screen *screen;
17
18   screen = sw_screen_create(ws);
19   if (screen)
20      screen = debug_screen_wrap(screen);
21
22   return screen;
23}
24
25PUBLIC
26const struct sw_driver_descriptor swrast_driver_descriptor = {
27   .create_screen = swrast_create_screen,
28   .winsys = {
29#ifdef HAVE_PIPE_LOADER_DRI
30      {
31         .name = "dri",
32         .create_winsys = dri_create_sw_winsys,
33      },
34#endif
35#ifdef HAVE_PIPE_LOADER_KMS
36      {
37         .name = "kms_dri",
38         .create_winsys = kms_dri_create_winsys,
39      },
40#endif
41      {
42         .name = "null",
43         .create_winsys = null_sw_create,
44      },
45      {
46         .name = "wrapped",
47         .create_winsys = wrapper_sw_winsys_wrap_pipe_screen,
48      },
49      { 0 },
50   }
51};
52