mesa/glsl: add bitmask to track stages a program was linked against
[mesa.git] / src / mesa / main / api_loopback.c
index 9932a837336b16e8eb79cd973c4f70726b09a318..8b63d9c0e95e83ff0d0a9a8b0e304a275cd95403 100644 (file)
@@ -629,7 +629,10 @@ _mesa_Vertex2sv( const GLshort *v )
 void GLAPIENTRY
 _mesa_Vertex3dv( const GLdouble *v )
 {
-   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
+   if (v[2] == 0.0)
+      VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
+   else
+      VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
 }
 
 void GLAPIENTRY
@@ -1772,7 +1775,9 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx,
       SET_VertexAttribI4sv(dest, _mesa_VertexAttribI4sv);
       SET_VertexAttribI4ubv(dest, _mesa_VertexAttribI4ubv);
       SET_VertexAttribI4usv(dest, _mesa_VertexAttribI4usv);
+   }
 
+   if (ctx->API == API_OPENGL_CORE) {
       /* GL 4.1 / GL_ARB_vertex_attrib_64bit */
       SET_VertexAttribL1d(dest, _mesa_VertexAttribL1d);
       SET_VertexAttribL2d(dest, _mesa_VertexAttribL2d);