Hi Filippo,<br><br>Yup and it seems it was present in NVIDIA some years ago, but fixed now.<br><br>Anyway the bug is strange because even I tried to call setlocale(LC_NUMERIC, "C"); before compiling the shader and linking, and then restore by calling setlocale(LC_NUMERIC, "");, it still does not work.<br>
I thinking the problem happens at runtime, and not when parsing shader (because no error report in the ati shader compiler log).<br>Maybe the compiled shader is not understandable when it was parsed with locale "".<br>
<br>If I call setlocale(LC_NUMERIC, "C"); in gstopengl.c, then the sharder works :P (Do you remember the pb about "purple" result ? now I can see the right colors with this ATI card)<br><br>Is it a problem to never restore to "" ?<br>
<br>I am going to report the pb to the ATI Developer Support.<br><br>Sincerely<br><br>Julien<br><br><br><br><div class="gmail_quote">2008/11/29 Filippo Argiolas <span dir="ltr"><<a href="mailto:filippo.argiolas@gmail.com">filippo.argiolas@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Sat, Nov 29, 2008 at 4:05 PM, Julien Isorce <<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>> wrote:<br>
> Hi,<br>
Hi Julien,<br>
<div class="Ih2E3d"><br>
> ./test 0 give the wrong result: red color in the window. ( setlocale<br>
> (LC_ALL, ""); is called)<br>
> ./test 1 give the right result: yellow color in the window. ( setlocale<br>
> (LC_ALL, "C"); is called)<br>
<br>
</div>It seems that the ATI GLSL Compiler does some kind of localized string<br>
parsing on the shader source. When you call setlocale (LC_ALL, NULL)<br>
it just sets the french locale, where the decimal separator is the ","<br>
character. In "C" locale the decimal separator is the "." character.<br>
<br>
So the decimal part of the floats in the shader source is truncated<br>
because dot is not interpreted as decimal separator.<br>
>From your testcase:<br>
gl_FragColor = vec4(1.0, 0.9, 0.1, 1.0); is yellow on a C/english<br>
locale but becomes something like vec4(1, 0, 0, 1) (red) or like<br>
vec4(1,0, 0,9, 0,1, 1,0) (red with alpha=9) on a French locale.<br>
<br>
I don't know what could cause such a behaviour but I guess it's an ATI<br>
compiler bug. You should report it to their Developer Support, quoting<br>
from <a href="http://developer.amd.com/support/Pages/default.aspx" target="_blank">http://developer.amd.com/support/Pages/default.aspx</a> :<br>
"For all GPU-related developer inquiries, email <a href="mailto:devrel@ati.com">devrel@ati.com</a> with<br>
the subject line "GPU-Developer-Support""<br>
<br>
Best Regards,<br>
<br>
Filippo Argiolas<br>
<br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>
Build the coolest Linux based applications with Moblin SDK & win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</blockquote></div><br>