summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorTörök Edwin <edwintorok@gmail.com>2010-05-06 22:19:57 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-06 22:43:37 +0100
commit4d52a25326506f8a3e876ded029ff4db7749f8a9 (patch)
tree3485a586dd77ce3e177550afff6d62b31c3a1314 /src/gallium/drivers/llvmpipe
parent1fce9d58cc70deaff284e1d9d0ffcb15b61e7595 (diff)
gallivm: Require SSE2 for draw_llvm/llvmpipe due to LLVM PR6960.
Note that this also requires X86 for llvm, if llvmpipe/draw_llvm works on PPC then the condition should be extended to include && x86. Signed-off-by: Török Edwin <edwintorok@gmail.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 111eedc4f2..586afc8855 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -266,7 +266,16 @@ llvmpipe_destroy_screen( struct pipe_screen *_screen )
struct pipe_screen *
llvmpipe_create_screen(struct sw_winsys *winsys)
{
- struct llvmpipe_screen *screen = CALLOC_STRUCT(llvmpipe_screen);
+ struct llvmpipe_screen *screen;
+
+#ifdef PIPE_ARCH_X86
+ /* require SSE2 due to LLVM PR6960. */
+ util_cpu_detect();
+ if (!util_cpu_caps.has_sse2)
+ return NULL;
+#endif
+
+ screen = CALLOC_STRUCT(llvmpipe_screen);
#ifdef DEBUG
LP_DEBUG = debug_get_flags_option("LP_DEBUG", lp_debug_flags, 0 );