summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_loopback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/api_loopback.c')
-rw-r--r--src/mesa/main/api_loopback.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index 55ddb1c14a8..0c21302cc7c 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -35,6 +35,7 @@
#include "macros.h"
#include "colormac.h"
#include "api_loopback.h"
+#include "glthread.h"
/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
* calls to a smaller set of driver-provided formats. Currently just
@@ -45,34 +46,34 @@
* listed in dd.h. The easiest way for a driver to do this is to
* install the supplied software t&l module.
*/
-#define COLORF(r,g,b,a) _glapi_Dispatch->Color4f(r,g,b,a)
-#define VERTEX2(x,y) _glapi_Dispatch->Vertex2f(x,y)
-#define VERTEX3(x,y,z) _glapi_Dispatch->Vertex3f(x,y,z)
-#define VERTEX4(x,y,z,w) _glapi_Dispatch->Vertex4f(x,y,z,w)
-#define NORMAL(x,y,z) _glapi_Dispatch->Normal3f(x,y,z)
-#define TEXCOORD1(s) _glapi_Dispatch->TexCoord1f(s)
-#define TEXCOORD2(s,t) _glapi_Dispatch->TexCoord2f(s,t)
-#define TEXCOORD3(s,t,u) _glapi_Dispatch->TexCoord3f(s,t,u)
-#define TEXCOORD4(s,t,u,v) _glapi_Dispatch->TexCoord4f(s,t,u,v)
-#define INDEX(c) _glapi_Dispatch->Indexf(c)
-#define MULTI_TEXCOORD1(z,s) _glapi_Dispatch->MultiTexCoord1fARB(z,s)
-#define MULTI_TEXCOORD2(z,s,t) _glapi_Dispatch->MultiTexCoord2fARB(z,s,t)
-#define MULTI_TEXCOORD3(z,s,t,u) _glapi_Dispatch->MultiTexCoord3fARB(z,s,t,u)
-#define MULTI_TEXCOORD4(z,s,t,u,v) _glapi_Dispatch->MultiTexCoord4fARB(z,s,t,u,v)
-#define EVALCOORD1(x) _glapi_Dispatch->EvalCoord1f(x)
-#define EVALCOORD2(x,y) _glapi_Dispatch->EvalCoord2f(x,y)
-#define MATERIALFV(a,b,c) _glapi_Dispatch->Materialfv(a,b,c)
-#define RECTF(a,b,c,d) _glapi_Dispatch->Rectf(a,b,c,d)
+#define COLORF(r,g,b,a) GL_CALL(Color4f)(r,g,b,a)
+#define VERTEX2(x,y) GL_CALL(Vertex2f)(x,y)
+#define VERTEX3(x,y,z) GL_CALL(Vertex3f)(x,y,z)
+#define VERTEX4(x,y,z,w) GL_CALL(Vertex4f)(x,y,z,w)
+#define NORMAL(x,y,z) GL_CALL(Normal3f)(x,y,z)
+#define TEXCOORD1(s) GL_CALL(TexCoord1f)(s)
+#define TEXCOORD2(s,t) GL_CALL(TexCoord2f)(s,t)
+#define TEXCOORD3(s,t,u) GL_CALL(TexCoord3f)(s,t,u)
+#define TEXCOORD4(s,t,u,v) GL_CALL(TexCoord4f)(s,t,u,v)
+#define INDEX(c) GL_CALL(Indexf)(c)
+#define MULTI_TEXCOORD1(z,s) GL_CALL(MultiTexCoord1fARB)(z,s)
+#define MULTI_TEXCOORD2(z,s,t) GL_CALL(MultiTexCoord2fARB)(z,s,t)
+#define MULTI_TEXCOORD3(z,s,t,u) GL_CALL(MultiTexCoord3fARB)(z,s,t,u)
+#define MULTI_TEXCOORD4(z,s,t,u,v) GL_CALL(MultiTexCoord4fARB)(z,s,t,u,v)
+#define EVALCOORD1(x) GL_CALL(EvalCoord1f)(x)
+#define EVALCOORD2(x,y) GL_CALL(EvalCoord2f)(x,y)
+#define MATERIALFV(a,b,c) GL_CALL(Materialfv)(a,b,c)
+#define RECTF(a,b,c,d) GL_CALL(Rectf)(a,b,c,d)
/* Extension functions must be dereferenced through _glapi_Dispatch as
* not all libGL.so's will have all the uptodate entrypoints.
*/
-#define ATTRIB1(index,x) _glapi_Dispatch->VertexAttrib1fNV(index,x)
-#define ATTRIB2(index,x,y) _glapi_Dispatch->VertexAttrib2fNV(index,x,y)
-#define ATTRIB3(index,x,y,z) _glapi_Dispatch->VertexAttrib3fNV(index,x,y,z)
-#define ATTRIB4(index,x,y,z,w) _glapi_Dispatch->VertexAttrib4fNV(index,x,y,z,w)
-#define FOGCOORDF(x) _glapi_Dispatch->FogCoordfEXT(x)
-#define SECONDARYCOLORF(a,b,c) _glapi_Dispatch->SecondaryColor3fEXT(a,b,c)
+#define ATTRIB1(index,x) GL_CALL(VertexAttrib1fNV)(index,x)
+#define ATTRIB2(index,x,y) GL_CALL(VertexAttrib2fNV)(index,x,y)
+#define ATTRIB3(index,x,y,z) GL_CALL(VertexAttrib3fNV)(index,x,y,z)
+#define ATTRIB4(index,x,y,z,w) GL_CALL(VertexAttrib4fNV)(index,x,y,z,w)
+#define FOGCOORDF(x) GL_CALL(FogCoordfEXT)(x)
+#define SECONDARYCOLORF(a,b,c) GL_CALL(SecondaryColor3fEXT)(a,b,c)
static void GLAPIENTRY
loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )