mesa: Use SATURATE
[mesa.git] / src / mesa / main / api_loopback.c
index 59b59d3a9ecc64cf0cd515ca65615c6c2d828357..ba4b1995765e9c400dfaee92be71a154b81088fb 100644 (file)
 
 #define ATTRIBI_4UI(index,x,y,z,w)   CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w))
 
-#define ATTRIB1_D(index,x)         CALL_VertexAttribL1d(GET_DISPATCH(), (index,x))
-#define ATTRIB2_D(index,x,y)       CALL_VertexAttribL2d(GET_DISPATCH(), (index,x,y))
-#define ATTRIB3_D(index,x,y,z)     CALL_VertexAttribL3d(GET_DISPATCH(), (index,x,y,z))
-#define ATTRIB4_D(index,x,y,z,w)    CALL_VertexAttribL4d(GET_DISPATCH(), (index,x,y,z,w))
-
 void GLAPIENTRY
 _mesa_Color3b( GLbyte red, GLbyte green, GLbyte blue )
 {
@@ -629,10 +624,7 @@ _mesa_Vertex2sv( const GLshort *v )
 void GLAPIENTRY
 _mesa_Vertex3dv( const GLdouble *v )
 {
-   if (v[2] == 0.0)
-      VERTEX2( (GLfloat) v[0], (GLfloat) v[1] );
-   else
-      VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
+   VERTEX3( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
 }
 
 void GLAPIENTRY
@@ -824,12 +816,6 @@ _mesa_EvalCoord2dv( const GLdouble *u )
    EVALCOORD2( (GLfloat) u[0], (GLfloat) u[1] );
 }
 
-void GLAPIENTRY
-_mesa_EvalCoord2fv( const GLfloat *u )
-{
-   EVALCOORD2( u[0], u[1] );
-}
-
 void GLAPIENTRY
 _mesa_EvalCoord2d( GLdouble u, GLdouble v )
 {
@@ -842,12 +828,6 @@ _mesa_EvalCoord1dv( const GLdouble *u )
    EVALCOORD1( (GLfloat) *u );
 }
 
-void GLAPIENTRY
-_mesa_EvalCoord1fv( const GLfloat *u )
-{
-   EVALCOORD1( (GLfloat) *u );
-}
-
 void GLAPIENTRY
 _mesa_EvalCoord1d( GLdouble u )
 {
@@ -1498,54 +1478,6 @@ _mesa_VertexAttribI4usv(GLuint index, const GLushort *v)
    ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
 }
 
-void GLAPIENTRY
-_mesa_VertexAttribL1d(GLuint index, GLdouble x)
-{
-   ATTRIB1_D(index, x);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
-{
-   ATTRIB2_D(index, x, y);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
-{
-   ATTRIB3_D(index, x, y, z);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
-{
-   ATTRIB4_D(index, x, y, z, w);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL1dv(GLuint index, const GLdouble *v)
-{
-   ATTRIB1_D(index, v[0]);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL2dv(GLuint index, const GLdouble *v)
-{
-   ATTRIB2_D(index, v[0], v[1]);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL3dv(GLuint index, const GLdouble *v)
-{
-   ATTRIB3_D(index, v[0], v[1], v[2]);
-}
-
-void GLAPIENTRY
-_mesa_VertexAttribL4dv(GLuint index, const GLdouble *v)
-{
-   ATTRIB4_D(index, v[0], v[1], v[2], v[3]);
-}
-
 /*
  * This code never registers handlers for any of the entry points
  * listed in vtxfmt.h.
@@ -1687,10 +1619,8 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx,
       SET_MultiTexCoord4s(dest, _mesa_MultiTexCoord4s);
       SET_MultiTexCoord4sv(dest, _mesa_MultiTexCoord4sv);
       SET_EvalCoord2dv(dest, _mesa_EvalCoord2dv);
-      SET_EvalCoord2fv(dest, _mesa_EvalCoord2fv);
       SET_EvalCoord2d(dest, _mesa_EvalCoord2d);
       SET_EvalCoord1dv(dest, _mesa_EvalCoord1dv);
-      SET_EvalCoord1fv(dest, _mesa_EvalCoord1fv);
       SET_EvalCoord1d(dest, _mesa_EvalCoord1d);
       SET_Materiali(dest, _mesa_Materiali);
       SET_Materialiv(dest, _mesa_Materialiv);
@@ -1777,17 +1707,4 @@ _mesa_loopback_init_api_table(const struct gl_context *ctx,
       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);
-      SET_VertexAttribL3d(dest, _mesa_VertexAttribL3d);
-      SET_VertexAttribL4d(dest, _mesa_VertexAttribL4d);
-
-      SET_VertexAttribL1dv(dest, _mesa_VertexAttribL1dv);
-      SET_VertexAttribL2dv(dest, _mesa_VertexAttribL2dv);
-      SET_VertexAttribL3dv(dest, _mesa_VertexAttribL3dv);
-      SET_VertexAttribL4dv(dest, _mesa_VertexAttribL4dv);
-   }
 }