2 #ifndef INLINE_WRAPPER_SW_HELPER_H
3 #define INLINE_WRAPPER_SW_HELPER_H
5 #include "target-helpers/inline_sw_helper.h"
6 #include "sw/wrapper/wrapper_sw_winsys.h"
9 * Try to wrap a hw screen with a software screen.
10 * On failure will return given screen.
12 static INLINE
struct pipe_screen
*
13 sw_screen_wrap(struct pipe_screen
*screen
)
15 #if defined(GALLIUM_SOFTPIPE) || defined(GALLIUM_LLVMPIPE)
16 struct sw_winsys
*sws
;
17 struct pipe_screen
*sw_screen
= NULL
;
20 driver
= debug_get_option("GALLIUM_DRIVER", "native");
21 if (strcmp(driver
, "native") == 0)
24 sws
= wrapper_sw_winsys_wrap_pipe_screen(screen
);
28 sw_screen
= sw_screen_create_named(sws
, driver
);
36 return wrapper_sw_winsys_dewrap_pipe_screen(sws
);