summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-02-24 17:45:55 -0600
committerTim Rowley <[email protected]>2016-03-02 18:38:41 -0600
commitda4f95d168fa35234a1ed8e6b27a38fd8e8f7498 (patch)
treec87962d15dcf6cc4bc36cad4e9c5211194d417f5 /src/gallium/auxiliary/target-helpers
parentea37602273d039fc3428a3be9e1bedc1e1282e01 (diff)
gallium/target-helpers: add OpenSWR driver
Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Acked-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_sw_helper.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
index a9ab16f2b54..5bb77a5bde2 100644
--- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
@@ -6,6 +6,9 @@
#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:
* llvmpipe, softpipe.
@@ -43,10 +46,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;
}
@@ -61,6 +69,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