diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/target-helpers/inline_sw_helper.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index 8a144db09c3..d8cee2b2917 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -91,6 +91,34 @@ drisw_create_screen(struct drisw_loader_funcs *lf) return screen; } #endif // DRI_TARGET + +#if defined(NINE_TARGET) +#include "sw/wrapper/wrapper_sw_winsys.h" +#include "target-helpers/inline_debug_helper.h" + +extern struct pipe_screen *ninesw_create_screen(struct pipe_screen *screen); + +INLINE struct pipe_screen * +ninesw_create_screen(struct pipe_screen *pscreen) +{ + struct sw_winsys *winsys = NULL; + struct pipe_screen *screen = NULL; + + winsys = wrapper_sw_winsys_wrap_pipe_screen(pscreen); + if (winsys == NULL) + return NULL; + + screen = sw_screen_create(winsys); + if (screen == NULL) { + winsys->destroy(winsys); + return NULL; + } + + screen = debug_screen_wrap(screen); + return screen; +} +#endif // NINE_TARGET + #endif // GALLIUM_SOFTPIPE |