summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-08-09 17:15:17 +0100
committerJosé Fonseca <[email protected]>2009-08-29 09:21:27 +0100
commitb836b2593c0450125bef6b88b02c7d6c20e9eff8 (patch)
tree3d967763b35666f4b7081ae7d39ba127b262929f /src/gallium
parent2529ed5616b1b152766a3355444260b88184cd6e (diff)
xlib: Complete llvmpipe integration.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/glx/xlib/SConscript3
-rw-r--r--src/gallium/winsys/xlib/SConscript2
-rw-r--r--src/gallium/winsys/xlib/xlib.c9
-rw-r--r--src/gallium/winsys/xlib/xlib.h1
4 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/SConscript b/src/gallium/state_trackers/glx/xlib/SConscript
index 04a44c30671..fa96df357d5 100644
--- a/src/gallium/state_trackers/glx/xlib/SConscript
+++ b/src/gallium/state_trackers/glx/xlib/SConscript
@@ -4,8 +4,7 @@
Import('*')
if env['platform'] == 'linux' \
- and 'mesa' in env['statetrackers'] \
- and ('softpipe' or 'i915simple' or 'trace') in env['drivers']:
+ and 'mesa' in env['statetrackers']:
env = env.Clone()
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
index 0fb4b50f634..f67a94466a1 100644
--- a/src/gallium/winsys/xlib/SConscript
+++ b/src/gallium/winsys/xlib/SConscript
@@ -5,7 +5,7 @@ Import('*')
if env['platform'] == 'linux' \
and 'mesa' in env['statetrackers'] \
- and ('softpipe' or 'i915simple' or 'trace') in env['drivers'] \
+ and set(('softpipe', 'llvmpipe', 'i915simple', 'trace')).intersection(env['drivers']) \
and not env['dri']:
env = env.Clone()
diff --git a/src/gallium/winsys/xlib/xlib.c b/src/gallium/winsys/xlib/xlib.c
index da722282156..744e8656416 100644
--- a/src/gallium/winsys/xlib/xlib.c
+++ b/src/gallium/winsys/xlib/xlib.c
@@ -45,6 +45,7 @@ enum mode {
MODE_TRACE,
MODE_BRW,
MODE_CELL,
+ MODE_LLVMPIPE,
MODE_SOFTPIPE
};
@@ -62,7 +63,11 @@ static enum mode get_mode()
return MODE_CELL;
#endif
+#if defined(GALLIUM_LLVMPIPE)
+ return MODE_LLVMPIPE;
+#else
return MODE_SOFTPIPE;
+#endif
}
static void _init( void ) __attribute__((constructor));
@@ -87,6 +92,10 @@ static void _init( void )
xmesa_set_driver( &xlib_cell_driver );
#endif
break;
+ case MODE_LLVMPIPE:
+#if defined(GALLIUM_LLVMPIPE)
+ xmesa_set_driver( &xlib_llvmpipe_driver );
+#endif
case MODE_SOFTPIPE:
#if defined(GALLIUM_SOFTPIPE)
xmesa_set_driver( &xlib_softpipe_driver );
diff --git a/src/gallium/winsys/xlib/xlib.h b/src/gallium/winsys/xlib/xlib.h
index d602ab0b133..347d45f4d66 100644
--- a/src/gallium/winsys/xlib/xlib.h
+++ b/src/gallium/winsys/xlib/xlib.h
@@ -7,6 +7,7 @@
extern struct xm_driver xlib_trace_driver;
extern struct xm_driver xlib_softpipe_driver;
+extern struct xm_driver xlib_llvmpipe_driver;
extern struct xm_driver xlib_cell_driver;
extern struct xm_driver xlib_brw_driver;