[Mesa-dev] wider registers in llvmpipe

Stéphane Marchesin stephane.marchesin at gmail.com
Sun Oct 7 15:37:15 PDT 2012


On Wed, Jul 18, 2012 at 8:35 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
>
>
> ----- Original Message -----
>> Am 18.07.2012 07:11, schrieb Marek Olšák:
>> > On Wed, Jul 18, 2012 at 1:58 AM, Roland Scheidegger
>> > <sroland at vmware.com> wrote:
>> >> Am 17.07.2012 23:49, schrieb Stéphane Marchesin:
>> >>> On Mon, Jul 16, 2012 at 11:43 AM, Jose Fonseca
>> >>> <jfonseca at vmware.com> wrote:
>> >>>> FYI, I've just pushed a branch named llvmpipe-wider-regs, which
>> >>>> allows llvmpipe to leverage SIMD registers wider than 128bits.
>> >>>>
>> >>>> Unfortunately, performance-wise this doesn't change much, as
>> >>>> llvmpipe performance is dominated by integer SIMD instructions,
>> >>>> whereas currently the AVX instruction set currently only
>> >>>> supports floating SIMD instructions.  Actually, often things
>> >>>> will get slightly slower, as there are considerable overheads
>> >>>> in piecing together the 256 floating point code paths and
>> >>>> 128-bit integer code paths.
>> >>>>
>> >>>> The benefit for this change is foremost architectural: llvmpipe
>> >>>> now makes less assumptions regarding the number of
>> >>>> pixels/quads/etc that fit into a hardware register, a
>> >>>> flexibility which will be necessary to get things like
>> >>>> per-pixel LOD working properly.
>> >>>>
>> >>>> This barely touch files outside gallivm/draw/llvmpipe modules. I
>> >>>> haven't tested i915g, r300g, so let me know if there are
>> >>>> regressions / concerns. I'd like to merge this into master
>> >>>> soon.
>> >>>
>> >>>
>> >>> It regresses the following on i915g (and I suspect it will
>> >>> regress on
>> >>> llvmpipe also):
>> >>> draw-vertices pass -> abort
>> >>> draw-vertices-half-float pass -> crash
>> >>> draw-vertices-half-float-user pass -> crash
>> >>> draw-vertices-user pass -> abort
>> >>>
>> >>> The machine in question doesn't have AVX (or llvm 3.1 for that
>> >>> matter).
>> >>
>> >>
>> >> I've tested this with both llvm 3.1 and 2.9, with and without avx
>> >> and
>> >> draw-vertices and draw-vertices-half-float always pass with
>> >> llvmpipe.
>> >> I don't see the other two tests (draw-vertices-half-float-user and
>> >> draw-vertices-user) in piglit.
>> >
>> > Those are the same tests but with the first parameter being "user".
>> > The test names in all.tests do not necessarily have to match the
>> > executable filenames.
>>
>> Ok. These pass too here with llvmpipe.
>
> I can't reproduce the failures here neither, nor with softpipe + draw llvm
>
> I also considered that this could be 32bits specific, but that doesn't seem to be the case.  It seems i915g specific AFAICT.
>
> Stephane I'll gonna need to to provide more details (in particular, stack dump of the crashes, dumps w/ GALLIVM_DEBUG=tgsi,ir,asm environment var before/after this change, see if not advertise half float solve the issue) to pin point this. If you wanna open a bug and follow this on fdo that's fine by me.
>

Unearthing an old item now that I have time for it. I can reproduce
with llvmpipe on the same machine, hopefully the backtrace rings a
bell, I'll also try to dig further into it. Running draw-vertices in
gdb I get:

UNREACHABLE executed!

Program received signal SIGABRT, Aborted.
0x00110416 in __kernel_vsyscall ()
Missing separate debuginfos, use: debuginfo-install
expat-2.0.1-11.fc15.i686 freeglut-2.6.0-6.fc15.i686 glibc-2.14-3.i686
libX11-1.4.3-1.fc15.i686 libXau-1.0.6-2.fc15.i686
libXdamage-1.1.3-2.fc15.i686 libXext-1.2.0-2.fc15.i686
libXfixes-5.0-1.fc15.i686 libXi-1.4.3-1.fc15.i686
libXxf86vm-1.1.1-2.fc15.i686 libgcc-4.6.1-9.fc15.i686
libstdc++-4.6.1-9.fc15.i686 libxcb-1.7-2.fc15.i686
mesa-libGL-7.11-0.11.20110525.0.fc15.i686
mesa-libGLU-7.11-0.11.20110525.0.fc15.i686
(gdb) bt
#0  0x00110416 in __kernel_vsyscall ()
#1  0x46a5026f in raise () from /lib/libc.so.6
#2  0x46a51ba5 in abort () from /lib/libc.so.6
#3  0x00bcb4fd in llvm::llvm_unreachable_internal(char const*, char
const*, unsigned int) () from /usr/lib/dri/swrast_dri.so
#4  0x00648d71 in llvm::SelectionDAG::getNode(unsigned int,
llvm::DebugLoc, llvm::EVT, llvm::SDValue) () from
/usr/lib/dri/swrast_dri.so
#5  0x006e9b89 in
llvm::DAGTypeLegalizer::WidenVecRes_Convert(llvm::SDNode*) () from
/usr/lib/dri/swrast_dri.so
#6  0x006eb0f4 in
llvm::DAGTypeLegalizer::WidenVectorResult(llvm::SDNode*, unsigned int)
() from /usr/lib/dri/swrast_dri.so
#7  0x006cc5bc in llvm::DAGTypeLegalizer::run() () from
/usr/lib/dri/swrast_dri.so
#8  0x006d23c3 in llvm::SelectionDAG::LegalizeTypes() () from
/usr/lib/dri/swrast_dri.so
#9  0x006981b3 in llvm::SelectionDAGISel::CodeGenAndEmitDAG() () from
/usr/lib/dri/swrast_dri.so
#10 0x006997b9 in
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) () from
/usr/lib/dri/swrast_dri.so
#11 0x00699a84 in
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) ()
from /usr/lib/dri/swrast_dri.so
#12 0x0069a725 in
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
() from /usr/lib/dri/swrast_dri.so
#13 0x007ce313 in
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) () from
/usr/lib/dri/swrast_dri.so
#14 0x00b6cc5f in llvm::FPPassManager::runOnFunction(llvm::Function&)
() from /usr/lib/dri/swrast_dri.so
#15 0x00b6ce17 in llvm::FunctionPassManagerImpl::run(llvm::Function&)
() from /usr/lib/dri/swrast_dri.so
#16 0x00b6cefe in llvm::FunctionPassManager::run(llvm::Function&) ()
from /usr/lib/dri/swrast_dri.so
#17 0x00775484 in llvm::JIT::jitTheFunction(llvm::Function*,
llvm::MutexGuard const&) () from /usr/lib/dri/swrast_dri.so
#18 0x0077589f in llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*,
llvm::MutexGuard const&) () from /usr/lib/dri/swrast_dri.so
#19 0x00775ab7 in llvm::JIT::getPointerToFunction(llvm::Function*) ()
from /usr/lib/dri/swrast_dri.so
#20 0x00791d34 in
llvm::ExecutionEngine::getPointerToGlobal(llvm::GlobalValue const*) ()
from /usr/lib/dri/swrast_dri.so
#21 0x00797e84 in LLVMGetPointerToGlobal () from /usr/lib/dri/swrast_dri.so
#22 0x00516e71 in gallivm_jit_function (gallivm=0x87e7378,
func=0x85e9780) at gallivm/lp_bld_init.c:605
#23 0x00529b9d in draw_llvm_create_variant (llvm=0x80ccf08,
num_inputs=2, key=0xbfffe75c) at draw/draw_llvm.c:411
#24 0x0052ae4e in llvm_middle_end_prepare (middle=0x80c3008,
in_prim=4, opt=3, max_vertices=0x80ddd54)
    at draw/draw_pt_fetch_shade_pipeline_llvm.c:162
#25 0x00485133 in vsplit_prepare (frontend=0x80ddd38, in_prim=4,
middle=0x80c3008, opt=3) at draw/draw_pt_vsplit.c:175
#26 0x00480b85 in draw_pt_arrays (draw=0x80cc180, prim=4, start=0,
count=3) at draw/draw_pt.c:134
#27 0x00480f2e in draw_vbo (draw=0x80cc180, info=0xbfffeb90) at
draw/draw_pt.c:523
#28 0x0029dbfb in llvmpipe_draw_vbo (pipe=0x80c2460, info=0xbfffeb90)
at lp_draw_arrays.c:92
#29 0x00471cac in cso_draw_vbo (cso=0x81c7ab0, info=0xbfffeb90) at
cso_cache/cso_context.c:1328
#30 0x0034fed2 in st_draw_vbo (ctx=0x8158b50, prims=0xbfffec20,
nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0,
max_index=2,
    tfb_vertcount=0x0) at ../../src/mesa/state_tracker/st_draw.c:265
#31 0x0042e4b1 in vbo_draw_arrays (ctx=0x8158b50, mode=4, start=0,
count=3, numInstances=1, baseInstance=0)
    at ../../src/mesa/vbo/vbo_exec_array.c:645
#32 0x0042e592 in vbo_exec_DrawArrays (mode=4, start=0, count=3) at
../../src/mesa/vbo/vbo_exec_array.c:675
#33 0x4946ad19 in glDrawArrays () from /usr/lib/libGL.so.1
---Type <return> to continue, or q <return> to quit---
#34 0x0806d966 in test_double_vertices (x1=280, y1=20, x2=300, y2=40,
index=0) at /home/marcheu/boulot/piglit/tests/general/draw-vertices.c:405
#35 0x0806ddd0 in piglit_display () at
/home/marcheu/boulot/piglit/tests/general/draw-vertices.c:563
#36 0x0806e4e7 in display () at
/home/marcheu/boulot/piglit/tests/util/piglit-framework.c:56
#37 0x4765e3c3 in ?? () from /usr/lib/libglut.so.3
#38 0x47661dc7 in fgEnumWindows () from /usr/lib/libglut.so.3
#39 0x4765e86e in glutMainLoopEvent () from /usr/lib/libglut.so.3
#40 0x4765f104 in glutMainLoop () from /usr/lib/libglut.so.3
#41 0x0806ec1e in main (argc=1, argv=0xbffff344) at
/home/marcheu/boulot/piglit/tests/util/piglit-framework.c:294

Stéphane


More information about the mesa-dev mailing list