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>
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;
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 );