[Mesa-users] Possible regression with gl_ClipVertex on Intel gen4

Lukas Jirkovsky l.jirkovsky at gmail.com
Mon Jan 28 11:26:08 PST 2013


Hello, I'm having problem with gl_ClipVertex for some time on Intel
GMA 4500MHD, that I think is caused by an update from mesa 8.0.4 to
9.0.x.

In the following example the gl_ClipVertex didn't cause any issues on
Intel before update and it works fine when using nVidia proprietary
drivers (at least the non-stripped version) it was tested to work
correctly on windows too (nvidia).

Assume the following GLSL shaders:

VERTEX SHADER
---------------------
varying vec3 v;
varying vec4 color;

void main()
{
	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
	v = vec3(gl_ModelViewMatrix * gl_Vertex);
	color = vec4(1.0, 0.0, 0.0, 1.0);

	gl_ClipVertex = gl_ModelViewMatrix * gl_Position;
}


FRAGMENT SHADER
--------------------------
varying vec3 v;
varying vec4 color;

void main()
{
	gl_FragColor = color;
}

Description of a problem
-------------------------------
when gl_Clip vertex is uncommented on gen4 with recent drivers, it
seems that the value of "v" overwrites the value of color.

Is this a bug?

Lukas


More information about the mesa-users mailing list