summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorTörök Edwin <[email protected]>2010-05-06 22:19:57 +0100
committerJosé Fonseca <[email protected]>2010-05-06 22:43:37 +0100
commit4d52a25326506f8a3e876ded029ff4db7749f8a9 (patch)
tree3485a586dd77ce3e177550afff6d62b31c3a1314 /src/gallium/auxiliary/draw
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 <[email protected]> Signed-off-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index ea9b7c90a51..8295a439b97 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -161,9 +161,16 @@ create_vertex_header(struct draw_llvm *llvm, int data_elems)
struct draw_llvm *
draw_llvm_create(struct draw_context *draw)
{
- struct draw_llvm *llvm = CALLOC_STRUCT( draw_llvm );
+ struct draw_llvm *llvm;
+#ifdef PIPE_ARCH_X86
util_cpu_detect();
+ /* require SSE2 due to LLVM PR6960. */
+ if (!util_cpu_caps.has_sse2)
+ return NULL;
+#endif
+
+ llvm = CALLOC_STRUCT( draw_llvm );
llvm->draw = draw;
llvm->engine = draw->engine;