X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Ftarget-helpers%2Finline_sw_helper.h;h=c89ef14a6fb0938557ee2768b77d1656f6cbba5c;hb=f69bf7fe8c98c9a4aa4a447443597ae038f6bf0b;hp=34bfa527db0c99a1179a2a8fdaa0ae7835ea505e;hpb=4926c5748028d33da4808f8a5473aa7b2f2bdc62;p=mesa.git diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h index 34bfa527db0..c89ef14a6fb 100644 --- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h @@ -6,9 +6,12 @@ #include "util/u_debug.h" #include "state_tracker/sw_winsys.h" +#ifdef GALLIUM_SWR +#include "swr/swr_public.h" +#endif /* Helper function to choose and instantiate one of the software rasterizers: - * cell, llvmpipe, softpipe. + * llvmpipe, softpipe. */ #ifdef GALLIUM_SOFTPIPE @@ -19,47 +22,62 @@ #include "llvmpipe/lp_public.h" #endif -#ifdef GALLIUM_CELL -#include "cell/ppu/cell_public.h" +#ifdef GALLIUM_VIRGL +#include "virgl/virgl_public.h" +#include "virgl/vtest/virgl_vtest_public.h" #endif - -static INLINE struct pipe_screen * +static inline struct pipe_screen * sw_screen_create_named(struct sw_winsys *winsys, const char *driver) { struct pipe_screen *screen = NULL; -#if defined(GALLIUM_CELL) - if (screen == NULL && strcmp(driver, "cell") == 0) - screen = cell_create_screen(winsys); -#endif - #if defined(GALLIUM_LLVMPIPE) if (screen == NULL && strcmp(driver, "llvmpipe") == 0) screen = llvmpipe_create_screen(winsys); #endif +#if defined(GALLIUM_VIRGL) + if (screen == NULL && strcmp(driver, "virpipe") == 0) { + struct virgl_winsys *vws; + vws = virgl_vtest_winsys_wrap(winsys); + screen = virgl_create_screen(vws, NULL); + } +#endif + #if defined(GALLIUM_SOFTPIPE) - if (screen == NULL) + if (screen == NULL && strcmp(driver, "softpipe") == 0) screen = softpipe_create_screen(winsys); #endif +#if defined(GALLIUM_SWR) + if (screen == NULL && strcmp(driver, "swr") == 0) + screen = swr_create_screen(winsys); +#endif + +#if defined(GALLIUM_ZINK) + if (screen == NULL && strcmp(driver, "zink") == 0) + screen = zink_create_screen(winsys); +#endif + return screen; } -static INLINE struct pipe_screen * +static inline struct pipe_screen * sw_screen_create(struct sw_winsys *winsys) { const char *default_driver; const char *driver; -#if defined(GALLIUM_CELL) - default_driver = "cell"; -#elif defined(GALLIUM_LLVMPIPE) +#if defined(GALLIUM_LLVMPIPE) default_driver = "llvmpipe"; #elif defined(GALLIUM_SOFTPIPE) default_driver = "softpipe"; +#elif defined(GALLIUM_SWR) + default_driver = "swr"; +#elif defined(GALLIUM_ZINK) + default_driver = "zink"; #else default_driver = ""; #endif @@ -68,5 +86,4 @@ sw_screen_create(struct sw_winsys *winsys) return sw_screen_create_named(winsys, driver); } - #endif