Bug 27867 - llvmpipe/softpipe broken on old CPUs
Summary: llvmpipe/softpipe broken on old CPUs
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Jose Fonseca
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-28 05:08 UTC by Andrew Randrianasulu
Modified: 2010-05-06 14:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
workaround patch that turns off LLVM if no SSE 2 is present (2.06 KB, patch)
2010-04-28 05:17 UTC, Török Edwin
Details | Splinter Review

Description Andrew Randrianasulu 2010-04-28 05:08:24 UTC
Using mesa master up to 

commit 2787a2e731d7628e150d607939509a05500fd29f
Author: Pierre Willenbrock <pierre@pirsoft.de>
Date:   Tue Apr 27 23:16:49 2010 +0200

    Disable scissor when begining meta operations
    
    Signed-off-by: Eric Anholt <eric@anholt.net>

+ llvm-2.7 (release build, with optimizations)

i get:

guest@slax:~/source/mesa$ glxgears
libGL: OpenDriver: trying /home/guest/source/mesa/lib/gallium//swrast_dri.so
libGL error: dlopen /home/guest/source/mesa/lib/gallium//swrast_dri.so failed (/home/guest/source/mesa/lib/gallium//swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL: OpenDriver: trying /home/guest/source/mesa/lib/gallium//swrastg_dri.so
glxgears: X86ISelLowering.cpp:6058: llvm::SDValue llvm::X86TargetLowering::LowerVSETCC(llvm::SDValue, llvm::SelectionDAG&): Assertion `VT0 == MVT::v4f32 || VT0 == MVT::v2f64' failed.
Stack dump:
0.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@shader'
Aborted

-----

guest@slax:~/source/mesa$ export  GALLIUM_DRIVER=softpipe
guest@slax:~/source/mesa$ glxgears
libGL: OpenDriver: trying /home/guest/source/mesa/lib/gallium//swrast_dri.so
libGL error: dlopen /home/guest/source/mesa/lib/gallium//swrast_dri.so failed (/home/guest/source/mesa/lib/gallium//swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL: OpenDriver: trying /home/guest/source/mesa/lib/gallium//swrastg_dri.so
glxgears: X86ISelLowering.cpp:6058: llvm::SDValue llvm::X86TargetLowering::LowerVSETCC(llvm::SDValue, llvm::SelectionDAG&): Assertion `VT0 == MVT::v4f32 || VT0 == MVT::v2f64' failed.
Stack dump:
0.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@draw_llvm_shader'
Aborted


corresponding llvm bug - http://llvm.org/bugs/show_bug.cgi?id=6960


In addition, i was unable to switch llvmpipe/softpipe with asm-optimized mesa build .. may be some stupid user error on my side, not sure if it worth additional bugreport
Comment 1 Andrew Randrianasulu 2010-04-28 05:15:24 UTC
patch from http://paste.debian.net/71009/ helps, at least softpipe runs now....
Comment 2 Török Edwin 2010-04-28 05:17:33 UTC
Created attachment 35317 [details] [review]
workaround patch that turns off LLVM if no SSE 2 is present

attaching the patch so it doesn't get lost.
Comment 3 Brian Paul 2010-04-28 07:51:09 UTC
Ideally, we should fall back to generating regular x86 code w/out SSE but this seems OK for now.  Jose?
Comment 4 Jose Fonseca 2010-05-06 10:16:02 UTC
(In reply to comment #3)
> Ideally, we should fall back to generating regular x86 code w/out SSE but this
> seems OK for now.  Jose?

Sorry, I missed this one before.

I can try a better workaround in llvmpipe -- to not emit the floating point comparison instructions when sse is not enabled.

But LLVM should not crash like this regardless.
Comment 5 Jose Fonseca 2010-05-06 14:21:36 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Ideally, we should fall back to generating regular x86 code w/out SSE but this
> > seems OK for now.  Jose?
> 
> Sorry, I missed this one before.
> 
> I can try a better workaround in llvmpipe -- to not emit the floating point
> comparison instructions when sse is not enabled.
> 
> But LLVM should not crash like this regardless.

This is a more complex LLVM error -- the single precision comparison functions are SSE, not SSE2.

Török Edwin, I applied your patch after #ifdef PIPE_ARCH_X86. 

Jose


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.