I have made a simple test case : http://hicham.fedorapeople.org/lightspark/ls-testcase.tar.bz2
I can't reproduce this. Your test case prints "program linking succeeded".
Now I see you're using 7.9. This issue has apparently been fixed in master. I guess the fix will find its way to the next 7.9.x version. Could you possibly bisect which commit fixed it in master?
I can confirm this testcase fails to link with current mesa-git (51b895041c65f7ec9ecda48e79279dde29258b07), on radeon mobility 9600 m10 (rv350) and 2.6.36.
I don't have 51b895041c65f7ec9ecda48e79279dde29258b07 in my Mesa tree, which means it doesn't exist. Don't you have some patches applied locally?
(In reply to comment #4) > I don't have 51b895041c65f7ec9ecda48e79279dde29258b07 in my Mesa tree, which > means it doesn't exist. Don't you have some patches applied locally? You are correct. I must have copy&pasted the wrong line... Gitk shows "e7c74a7dfab789496761226fe62a08f2d9fea5c7 - st/mesa: set MaxUniformComponents" for mesa. 51b895041c65f7ec9ecda48e79279dde29258b07 appears to be from libdrm. Sorry for the mixup.
Just updated both my computers to latest git today, the test case prints "program linking succeeded" on my RV530(X1600), but fails on my RV410(Mobility X700), with same git versions of libdrm, mesa and xf86-video-ati.
Please query GL_LINK_STATUS and post what it says.
(In reply to comment #7) > Please query GL_LINK_STATUS and post what it says. I think that is what I have done in the testcase, or am I missing something ? Anyway, I retested with Fedora rawhide, which ships mesa-7.10 snapshot from 20101118 and I still get the same failure. kernel : 2.6.36 libdrm : 2.4.23 branch git snapshot from 20101123
Ah sorry about that. I meant this: Could you please post what glGetProgramInfoLog returns? It should give us a clue. Thank you.
(In reply to comment #9) > Ah sorry about that. I meant this: > > Could you please post what glGetProgramInfoLog returns? It should give us a > clue. Thank you. it gives : Couldn't flatten if statement
The if statement in the fragment shader is too complex. Could you possibly move the texture lookup in front of it and see if it helps?
(In reply to comment #11) > The if statement in the fragment shader is too complex. Could you possibly move > the texture lookup in front of it and see if it helps? modifying : ****************************************************************************** if(gl_Color.x==1.0 && texture2D(g_tex2,gl_TexCoord[1].xy).a==0.0) discard; ****************************************************************************** to : ****************************************************************************** bool res = ( gl_Color.x==1.0 && texture2D(g_tex2,gl_TexCoord[1].xy).a==0.0 ); if(res) discard; ****************************************************************************** gives the same error message
doing that : *********************** if(false) discard; *********************** makes the linking succeed
of course : ****************************************************** vec4 tex = texture2D(g_tex2,gl_TexCoord[1].xy); if(gl_Color.x==1.0 && tex.a==0.0) discard; ****************************************************** fails too
I am working on a fix.
The fix has been sent to ML: http://lists.freedesktop.org/archives/mesa-dev/2010-November/004214.html
Fixed in Mesa master. The fix will eventually make its way to 7.9. Closing..
(In reply to comment #17) > Fixed in Mesa master. The fix will eventually make its way to 7.9. Closing.. What commit fixed this bug ?
This set of patches: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ead2ea89f42b40edc56ddf8c6ce1df4efdcefe2a http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a1d063c6d679c2155f5eb80f1cb94368d36bf2c http://cgit.freedesktop.org/mesa/mesa/commit/?id=940df10100d740ef27fa39026fd51c3199ed3d62 http://cgit.freedesktop.org/mesa/mesa/commit/?id=1802cb9bafc4125300870be51e8b22ddd795d61e
Here is an attempt to backport the fixes to 7.9 : http://hicham.fedorapeople.org/lightspark/0001-Backport-fdbz-31827-fix-to-7.9.patch It applies against latest mesa-7.9. I tested it locally, and the testcase succeeds.
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.