summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers/inline_sw_helper.h
diff options
context:
space:
mode:
authorJoakim Sindholt <opensource@zhasha.com>2011-08-04 15:14:06 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2014-11-18 02:02:54 +0000
commitfdd96578ef2dfe9c4ad5aab5858036298d444a64 (patch)
tree3230b0fb321381250a506503825318facb10ca73 /src/gallium/auxiliary/target-helpers/inline_sw_helper.h
parent7d2573b5376bb4f9ce9a50e0b965e06032b135a9 (diff)
downloadexternal_mesa3d-fdd96578ef2dfe9c4ad5aab5858036298d444a64.zip
external_mesa3d-fdd96578ef2dfe9c4ad5aab5858036298d444a64.tar.gz
external_mesa3d-fdd96578ef2dfe9c4ad5aab5858036298d444a64.tar.bz2
nine: Add state tracker nine for Direct3D9 (v3)
Work of Joakim Sindholt (zhasha) and Christoph Bumiller (chrisbmr). DRI3 port done by Axel Davy (mannerov). v2: - nine_debug.c: klass extended from 32 chars to 96 (for sure) by glennk - Nine improvements by Axel Davy (which also fixed some wine tests) - by Emil Velikov: - convert to static/shared drivers - Sort and cleanup the includes - Use AM_CPPFLAGS for the defines - Add the linker garbage collector - Restrict the exported symbols (think llvm) v3: - small nine fixes - build system improvements by Emil Velikov v4: [Emil Velikov] - Do no link against libudev. No longer needed. Acked-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Axel Davy <axel.davy@ens.fr> Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers/inline_sw_helper.h')
-rw-r--r--src/gallium/auxiliary/target-helpers/inline_sw_helper.h28
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 8a144db..d8cee2b 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