Hello,
I don't understand what happens with ATI cards (no pb with nvidia).
I have a simple vertex shader. I created a function in this shader.
If I call the function some views are not drawn (I have one 2D (ortho) view and n perspective views).
If I copy/paste the code of the function in the main then all works well.
I also note this :
- if I disable antialiasing and I use the classical PIXELFORMATDESCRIPTOR then I have no more the problem.
- If I enable the GL_*_SMOOTH and I use the classical PIXELFORMATDESCRIPTOR then I have the problem.
- if I enable or disable GL_MULTISAMPLE_ARB and I use wglChoosePixelFormatARB then I have the problem.
I join the code of the vertex shader. You can also find the code in this post : http://www.opengl.org/discussion_boards/showthread.php/181280-GLSL-shader-2-funny-things-on-ATI-card...
I join the pixel formats.
I tested on an X1300/X1550, HD 5450, FirePro V3750 and FirePro V4800.
Do you have an idea of what can cause this problem ?
Thanks
I have posted another question : "Invalid depth buffer on ATI X1300/X1550"
It is strange : in this case too when I disable antialiasing I have no more problem...
I tested with the condition always false :
if (bIsTexture != 0) // always false
glTexCoord = glTexGen(0, TexGenMode, v);
So the function is not called. And I have the problem !
So it seems a problem with the generated code.
I have found a workaround for a HD5450 card. (a case in which the compiler/driver works...)
But it does not work on FirePro V3750.
So I will not use functions and put all the code in the main().
It seems impossible to target ATI cards : drivers or compilers are too unstable.
Same problem with Firepro V4800.
And still no answer from AMD people...
The problem of views not drawn when there is a function call in my vertex shader is solved on the last driver for Firepro V4800 (driver 9.3.3.3000).
There is still a problem : a crash when I draw dashed lines (with glLineStipple in display lists).
If I use my workaround (copy/paste of the code of the function in the main) then there is no crash !
So there is still a problem with the last driver on Firepro V4800.
There are problems on Firepro V3750 and there is no update since 23/05/2012 !!
And still no answer from AMD people to give explanations or workarounds...