[gst-devel] ATI + GLSL + setlocale + linux

Julien Isorce julien.isorce at gmail.com
Sat Nov 29 16:05:17 CET 2008


Hi,

Working on gst-plugins-gl (
http://diracvideo.org/git?p=gst-plugins-gl.git;a=summary , and the branch :
http://diracvideo.org/git?p=gst-plugins-gl.git;a=shortlog;h=remove_gstfreeglut)
, I am trying to resolve a bug about "ATI + fragment shader (from GLSL)  +
setlocale (from #include <locale.h>).

Well, shaders are not working if  setlocale (LC_ALL, "");  is called. And no
problem if   setlocale (LC_ALL, "C"); is called.
I can see any relation bettween the 2 things.

And setlocale (LC_ALL, ""); is called in gst_init.
(cvs/gstreamer/gst/gst.c). I have spent a lot of time to find that the bug
become when setlocale is called with arg "".

Anyway, I have made a minimal test which only requires  freeglut (or glut)
and have a graphic card which supports OpenGL and GLSL.
I joined this test to this mail:

./test 0   give the wrong result:  red color in the window. ( setlocale
(LC_ALL, "");  is called)
./test 1   give the right result:  yellow color in the window. ( setlocale
(LC_ALL, "C"); is called)

I have the bug on ubuntu intrepid (and Linux julien-desktop 2.6.27-9-generic
#1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux)
I join also my glxinfo output and my xorg.conf (I have little bit fired my
xorg.conf  but I had same bug with the default xorg.conf)
I have an ATI 9800 pro
fglrxinfo:
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9800 PRO
OpenGL version string: 2.1.8087 Release

(It seems there is no problem with an NVIDIA graphic card)

setlocale doc:
http://www.opengroup.org/onlinepubs/007908799/xsh/setlocale.html

my config:

echo $LANG
fr_FR.UTF-8

So what do you think I can do ? Bug come from fr_FR.UTF-8 environnement ?
Where should I report the problem ?

Please try the test if you have an ATI and GLSL and linux.

Sincerely

Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081129/54a920f6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 1613 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081129/54a920f6/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 144 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081129/54a920f6/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glxinfo.txt
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081129/54a920f6/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xorg.conf
Type: application/octet-stream
Size: 2356 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081129/54a920f6/attachment-0001.obj>


More information about the gstreamer-devel mailing list