[Mesa-users] mesa3d with llvm support
Muthukumar S
muthu.smk at gmail.com
Thu Jan 13 04:31:55 PST 2011
Hi
I have tested mesa3d gallium with llvm pipe in x86 and its working
fine.Thanks for your support to make this run.
I have two queries .
1. We have seen that the mesa3d source contain gallium drivers like
llvm,nouveau(nvidia), r300 etc .
If suppose i have two environment setups in which i have real GPU
1. nvidia GPU and with GALLIUM_DRIVER=nv*
2. nvidia GPU and with GALLIUM_DRIVER=llvmpipe
whether the above configuration is possible? ,if so which setup will give
better performance ?
2. What is the difference between gallium drivers like nouveau ,r300 etc
with llvmpipe ?.
If iam using other gallium drivers on based on real GPU like nouvau(for
nvidia ) ? will
this gallium llvmpipe driver will be comes into the picture while rendering,
to give better performance?
thanks
Muthukumar
On Wed, Jan 12, 2011 at 4:51 PM, Muthukumar S <muthu.smk at gmail.com> wrote:
> Hi Chai
>
> Can you tell me which llvm version are you using ?
>
> When EGL_DRIVERS_PATH is set, it should be prepended to the search
> path. Did you have the variable set when running the demo?
>
> I did make install ,hence below paths contain the same libraries.
> /usr/local/lib/egl
> /home/muthu/work/game/gallium/mesa-master-llvm-gcc-egl/lib/egl/
>
> thanks
> Muthukumar
>
>
> On Wed, Jan 12, 2011 at 4:38 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>
>> On Wed, Jan 12, 2011 at 6:25 PM, Muthukumar S <muthu.smk at gmail.com>
>> wrote:
>> > Hi All,
>> > Thanks for your reply,
>> > I tried as u said by giving the GALLIUM_DRIVER as softpipe and now
>> glxgears
>> > was working fine.As u said the problem is in gallium driver .
>> > Now again i tried by setting GALLIUM_DRIVER=llvmpipe ,and i try to run
>> > "glxgears" from opengles1 sample but its getting crashed inside the
>> gallium
>> > llvmpipe driver.
>> > I just given some prints in the "lp_state_vertex.c" which resides inside
>> > "mesa-master/src/gallium/drivers/llvmpipe"
>> > Iam not sure why its crashing in the llvm pipe.
>> > once again iam informing that my intension is to run any of the
>> > opengl/opengles application with gallium mesa3d with llvm support and
>> check
>> > the
>> > performance in linux (fedora 11).
>> > NOTE : LLVM libraries used to compile gallium mesa 3d
>> > : clang_llvm-2.7-i686-linux
>> > Mesa Version : Mesa 7.10.0
>> > $ ./configure --enable-debug --enable-gles1 --enable-gles2
>> > --enable-gallium-svga --enable-gallium-i915 --enable-gallium-i965
>> > --enable-gallium-llvm --disable-glut --with-dri-drivers=
>> > --disable-gallium-radeon --enable-gles-overlay
>> > --with-state-trackers=egl,vega
>> I did a clean build with same configure options. It works here. It
>> could be some compatibility issue with your LLVM version, but I am not
>> familiar with the code there. You might want to file a bug report.
>>
>> I do notice one thing weird in the EGL log below.
>>
>> > These are my export variables.:
>> > --------------------------------------------------
>> > export
>> >
>> LD_LIBRARY_PATH="/home/muthu/work/game/gallium/mesa-master-llvm-gcc-egl/lib"
>> > export EGL_LOG_LEVEL="debug"
>> > export GALLIUM_DRIVER="llvmpipe"
>> > export
>> >
>> EGL_DRIVERS_PATH="/home/muthu/work/game/gallium/mesa-master-llvm-gcc-egl/lib/egl/"
>> >
>> > Here iam sending the log messages.
>> > ------------------------------------------------------------
>> > [muthu at localhost opengles1]$ ./gears_x11
>> > libEGL debug: EGL search path is /usr/local/lib/egl
>> When EGL_DRIVERS_PATH is set, it should be prepended to the search
>> path. Did you have the variable set when running the demo?
>> > libEGL debug: added /usr/local/lib/egl/egl_gallium.so to module array
>> > libEGL debug: added /usr/local/lib/egl/egl_glx.so to module array
>> > libEGL debug: dlopen(/usr/local/lib/egl/egl_gallium.so)
>> > libEGL info: use X11 for display 0x871f008
>> > libEGL debug: searching for pipe module i915
>> > libEGL warning: failed to create DRM screen
>> > libEGL warning: use software fallback
>> > libEGL debug: searching for pipe module swrast
>> > libEGL debug: loaded /usr/local/lib/egl/pipe_swrast.so
>> > libEGL debug: the best driver is Gallium (score 100)
>> > EGL_VERSION = 1.4 (Gallium)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > libEGL debug: the value (0x0) of attribute 0x3025 did not meet the
>> criteria
>> > (0x1)
>> > ...
>> > ...
>> > ...
>> > libEGL debug: loaded /usr/local/lib/egl/st_GLESv1_CM.so
>> > [MUTHU][114][llvmpipe_init_vertex_funcs][lp_state_vertex.c]
>> > [MUTHU][83][llvmpipe_set_vertex_buffers][lp_state_vertex.c]
>> > [MUTHU][44][llvmpipe_create_vertex_elements_state][lp_state_vertex.c]
>> > [MUTHU][61][llvmpipe_bind_vertex_elements_state][lp_state_vertex.c]
>> > [MUTHU][102][llvmpipe_set_index_buffer][lp_state_vertex.c]
>> > Segmentation fault
>> > Here iam sending gdb back trace:
>> > ------------------------------------------------------
>> > 255 clipped = fpme->current_variant->jit_func_elts(
>> > &fpme->llvm->jit_context,
>> > (gdb) s
>> > Program received signal SIGSEGV, Segmentation fault.
>> > 0x00200539 in draw_llvm_shader_elts ()
>> > (gdb) bt
>> > #0 0x00200539 in draw_llvm_shader_elts ()
>> > #1 0x0104eae9 in llvm_pipeline_generic () at
>> > draw_pt_fetch_shade_pipeline_llvm.c:255
>> > #2 0x0104e88e in llvm_middle_end_run () at
>> > draw_pt_fetch_shade_pipeline_llvm.c:337
>> > #3 0x01007c42 in vsplit_flush_cache () at draw_pt_vsplit.c:77
>> > #4 vsplit_segment_cache_ushort () at draw_pt_vsplit.c:173
>> > #5 0x01006373 in vsplit_segment_simple_ushort ()
>> > at
>> >
>> /home/muthu/work/game/gallium/mesa-master-llvm-gcc-egl/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h:182
>> > #6 vsplit_run_ushort () at draw_pt_vsplit.c:111
>> > #7 0x01001439 in draw_pt_arrays () at draw_pt.c:113
>> > #8 0x0100174a in draw_vbo () at draw_pt.c:481
>> > #9 0x00fd3068 in llvmpipe_draw_vbo () at lp_draw_arrays.c:81
>> > #10 0x009986d4 in st_draw_vbo () at st_draw.c:732
>> > #11 0x00995610 in vbo_validated_drawrangeelements () at
>> vbo_exec_array.c:793
>> > #12 0x0099428e in vbo_exec_DrawElements () at vbo_exec_array.c:947
>> > #13 0x0804a299 in draw_gear () at gears.c:219
>> > #14 0x0804a004 in gears_draw () at gears.c:268
>> > #15 0x0804add3 in next_event () at eglut_x11.c:248
>> > #16 _eglutNativeEventLoop () at eglut_x11.c:242
>> > #17 0x08049639 in main () at gears.c:378
>> > It seems the function "draw_llvm_shader_elts() is getting crashed.
>> >
>> > can any one help me to fix out this issue.
>> > Thanks
>> > Muthukumar
>> >
>> >
>> > On Tue, Jan 11, 2011 at 9:15 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
>> >>
>> >> On Tue, Jan 11, 2011 at 10:00 PM, Muthukumar <muthu.smk at gmail.com>
>> wrote:
>> >> > Iam working in fc-11 ,and i try to compile and run gallium mesa3d
>> with
>> >> > llvm
>> >> > support .But i am getting some error while i try to run the opengl or
>> >> > opengles
>> >> > application. Can any one suggest me fix the issue .My intension is to
>> >> > run any of
>> >> > the opengl/opengles application with gallium mesa3d with llvm support
>> >> > and check
>> >> > the performance in linux (fedora 11).
>> >> >
>> >> > Here the configuration option of gallium mesa3d source
>> >> > ./configure --enable-debug --enable-gles1 --enable-gles2
>> >> > --enable-gallium-egl --
>> >> > enable-gallium-llvm --disable-glut --with-dri-drivers=i915
>> >> > --disable-gallium-
>> >> > radeon --enable-gles-overlay
>> >> >
>> >> >
>> >> > config.status: executing configs commands
>> >> >
>> >> > prefix: /usr/local
>> >> > exec_prefix: ${prefix}
>> >> > libdir: ${exec_prefix}/lib
>> >> > includedir: ${prefix}/include
>> >> >
>> >> > OpenGL: yes (ES1: yes ES2: yes)
>> >> > GLES overlay: yes
>> >> > OpenVG: no
>> >> >
>> >> > Driver: dri
>> >> > OSMesa: no
>> >> > DRI drivers: i915
>> >> > DRI driver dir: ${libdir}/dri
>> >> > Use XCB: no
>> >> >
>> >> > GLU: yes
>> >> > GLw: yes (Motif: no)
>> >> > glut: no
>> >> >
>> >> > EGL: yes
>> >> > EGL platforms: x11 drm
>> >> > EGL drivers: egl_glx egl_gallium
>> >> > EGL Gallium STs: $(GL_LIB) $(GLESv1_CM_LIB) $(GLESv2_LIB)
>> >> >
>> >> > llvm: yes
>> >> > llvm-config:
>> >> > /home/muthu/work/clang_llvm-2.7-i686-linux/bin/llvm-
>> >> > config
>> >> > llvm-version: 2.7
>> >> >
>> >> > Gallium: yes
>> >> > Gallium dirs: auxiliary drivers state_trackers
>> >> > Target dirs: egl dri-swrast
>> >> > Winsys dirs: sw sw/xlib sw/dri i915/sw
>> >> > Driver dirs: softpipe failover galahad trace rbug identity
>> >> > llvmpipe
>> >> > svga i915 i965
>> >> > Trackers dirs: dri egl
>> >> >
>> >> > Shared libs: yes
>> >> > Static libs: no
>> >> >
>> >> > CFLAGS: -g -O2 -Wall -Wmissing-prototypes -std=c99
>> >> > -ffast-math
>> >> > -fvisibility=hidden -fno-strict-aliasing -g -fPIC
>> >> > CXXFLAGS: -g -O2 -Wall -fvisibility=hidden
>> >> > -fno-strict-aliasing -
>> >> > g -fPIC
>> >> > Macros: -D_GNU_SOURCE -DPTHREADS -DDEBUG
>> >> > -DHAVE_POSIX_MEMALIGN
>> >> > -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -
>> >> > DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DGALLIUM_LLVMPIPE
>> >> > -D__STDC_CONSTANT_MACROS
>> >> > -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
>> >> >
>> >> > PYTHON2: python2
>> >> >
>> >> > Run 'gmake' to build Mesa
>> >> >
>> >> >
>> >> > and i have downloaded the "demo-master" (test apps) source and i
>> >> > compiled this
>> >> > apps with the above compiled libraries.
>> >> > If i try to run "gears_xll" or any other opengles apps iam getting
>> the
>> >> > following
>> >> > error with segmentation fault ,I debug it ,the control is going in to
>> >> > llvm pipe
>> >> > and then getting crashed with seg fault. before running the
>> application
>> >> > i have
>> >> > set the following environment variables.
>> >> >
>> >> > export
>> >> > LD_LIBRARY_PATH="/home/muthu/work/game/gallium/mesa-master-llvm-gcc-
>> >> > egl/lib"
>> >> > export EGL_PLATFORM="dri"
>> >> There is no need to set EGL_PLATFORM in this case and generally.
>> >> "dri" is also an invalid value.
>> >> > export
>> >> >
>> LIBGL_DRIVERs_PATH="/home/muthu/work/game/gallium/mesa-master-llvm-gcc-
>> >> > egl/lib/gallium/"
>> >> Without
>> >>
>> >> $ export
>> >>
>> EGL_DRIVERS_PATH="/home/muthu/work/game/gallium/mesa-master-llvm-gcc-egl/lib/egl/"
>> >>
>> >> it is likely that the wrong driver is loaded. You can set
>> >> EGL_LOG_LEVEL=debug to see which module is dlopen()ed; if you suspect
>> >> the crash is in llvmpipe, you may set GALLIUM_DRIVER=softpipe to see
>> >> if it still crashes. Either way, a gdb backtrace is helpful.
>> >>
>> >> >
>> >> >
>> >> > # ./gears_x11
>> >> > libEGL warning: failed to create DRM screen
>> >> > libEGL warning: use software fallback
>> >> > EGL_VERSION = 1.4 (Gallium)
>> >> > Segmentation fault
>> >> > [muthu at localhost opengles1]$ ./gears_x11
>> >> > libEGL warning: failed to create DRM screen
>> >> > libEGL warning: use software fallback
>> >> > EGL_VERSION = 1.4 (Gallium)
>> >> > Segmentation fault
>> >> >
>> >> >
>> >> > Can any one suggest me fix the above issue .My intension is to run
>> any
>> >> > of the
>> >> > opengl/opengles application with gallium mesa3d with llvm support and
>> >> > check the
>> >> > performance in linux (fedora 11).
>> >> >
>> >> > Thanks in advance.
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > mesa-users mailing list
>> >> > mesa-users at lists.freedesktop.org
>> >> > http://lists.freedesktop.org/mailman/listinfo/mesa-users
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> olv at LunarG.com
>> >
>> >
>> >
>> > --
>> > Anbudan
>> > S.Muthukumar
>> >
>> >
>>
>>
>>
>> --
>> olv at LunarG.com
>>
>
>
>
> --
> Anbudan
> S.Muthukumar
>
>
--
Anbudan
S.Muthukumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20110113/f258d8d7/attachment-0001.htm>
More information about the mesa-users
mailing list