summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-06-21 12:50:10 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2014-07-10 01:06:49 +0100
commit0bdc3e1afda111c5741a699da3ff891fedfe89de (patch)
tree45b059e54c82c58a9e19a5ff6bc76530c91520c5 /src/gallium/auxiliary/target-helpers
parent29ca7d2c9488d13e496ec65b6e1e1bf1d53042c5 (diff)
downloadexternal_mesa3d-0bdc3e1afda111c5741a699da3ff891fedfe89de.zip
external_mesa3d-0bdc3e1afda111c5741a699da3ff891fedfe89de.tar.gz
external_mesa3d-0bdc3e1afda111c5741a699da3ff891fedfe89de.tar.bz2
targets/dri-swrast: Convert to static/shared pipe-driver
Convert the final dri target to the single DRI (megadriver) library. Cleanup all the automake leftovers from the conversion stage and update the scons build. v2: Link in llvmpipe, when applicable. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Rob Clark <robclark@freedesktop.org> Tested-by: Thomas Helland <thomashelland90 at gmail.com> Acked-by: Tom Stellard <thomas.stellard@amd.com>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_sw_helper.h36
1 files changed, 36 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 596c691..8a144db 100644
--- a/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
+++ b/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
@@ -57,5 +57,41 @@ sw_screen_create(struct sw_winsys *winsys)
return sw_screen_create_named(winsys, driver);
}
+#if defined(GALLIUM_SOFTPIPE)
+#if defined(DRI_TARGET)
+#include "target-helpers/inline_debug_helper.h"
+#include "sw/dri/dri_sw_winsys.h"
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_swrast(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
+{
+ globalDriverAPI = &galliumsw_driver_api;
+ return galliumsw_driver_extensions;
+}
+
+INLINE struct pipe_screen *
+drisw_create_screen(struct drisw_loader_funcs *lf)
+{
+ struct sw_winsys *winsys = NULL;
+ struct pipe_screen *screen = NULL;
+
+ winsys = dri_create_sw_winsys(lf);
+ 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 // DRI_TARGET
+#endif // GALLIUM_SOFTPIPE
+
#endif