diff options
author | Tim Rowley <[email protected]> | 2016-04-15 12:38:25 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-04-15 14:21:50 -0500 |
commit | ee72fec9cfaddfef78a112f0b8d2f3f7f67a6535 (patch) | |
tree | 12a1fe797c25d6534ec7801518756a4ba4118381 /src/gallium/auxiliary | |
parent | f6d21bcd6b5cd5073a571034ec640177b0abf82d (diff) |
gallium/swr: allow swr use as a swrast dri driver
Reviewed-by: Emil Velikov <[email protected]>
Tested-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/target-helpers/sw_helper.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/target-helpers/sw_helper.h b/src/gallium/auxiliary/target-helpers/sw_helper.h index ae5f3de92ba..5e4e9f78af6 100644 --- a/src/gallium/auxiliary/target-helpers/sw_helper.h +++ b/src/gallium/auxiliary/target-helpers/sw_helper.h @@ -9,7 +9,7 @@ /* Helper function to choose and instantiate one of the software rasterizers: - * llvmpipe, softpipe. + * llvmpipe, softpipe, swr. */ #ifdef GALLIUM_SOFTPIPE @@ -20,6 +20,10 @@ #include "llvmpipe/lp_public.h" #endif +#ifdef GALLIUM_SWR +#include "swr/swr_public.h" +#endif + #ifdef GALLIUM_VIRGL #include "virgl/virgl_public.h" #include "virgl/vtest/virgl_vtest_public.h" @@ -44,10 +48,15 @@ sw_screen_create_named(struct sw_winsys *winsys, const char *driver) #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 + return screen; } @@ -62,6 +71,8 @@ sw_screen_create(struct sw_winsys *winsys) default_driver = "llvmpipe"; #elif defined(GALLIUM_SOFTPIPE) default_driver = "softpipe"; +#elif defined(GALLIUM_SWR) + default_driver = "swr"; #else default_driver = ""; #endif |