From 4bd94bd22704d16787b75c1ef57ff8176d5e566a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 25 Sep 2020 20:44:10 -0400 Subject: [PATCH] mesa: don't use GET_DISPATCH because it doesn't work with glthread GET_DISPATCH returns CurrentClientDispatch, which invokes glthread if it's enabled. GL function implementations should never call back to glthread. Reviewed-by: Ian Romanick Part-of: --- src/mesa/main/api_arrayelt.c | 289 ++++++++++++++++++++------------------- src/mesa/main/api_loopback.c | 84 +++++++----- src/mesa/main/draw.c | 59 +++++--- src/mesa/vbo/vbo_exec_eval.c | 8 +- src/mesa/vbo/vbo_save_api.c | 28 ++-- src/mesa/vbo/vbo_save_loopback.c | 4 +- 6 files changed, 254 insertions(+), 218 deletions(-) diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 5df7b05..7e0bb54 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -78,6 +78,13 @@ vertex_format_to_index(const struct gl_vertex_format *vformat) #define NUM_TYPES 8 +static struct _glapi_table * +get_dispatch(void) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->CurrentServerDispatch; +} + /** ** GL_NV_vertex_program @@ -88,31 +95,31 @@ vertex_format_to_index(const struct gl_vertex_format *vformat) static void GLAPIENTRY VertexAttrib1NbvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1bvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NbvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); + CALL_VertexAttrib2fNV(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2bvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NbvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]))); } @@ -120,13 +127,13 @@ VertexAttrib3NbvNV(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib3bvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NbvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]))); @@ -135,7 +142,7 @@ VertexAttrib4NbvNV(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib4bvNV(GLuint index, const GLbyte *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } /* GL_UNSIGNED_BYTE attributes */ @@ -143,46 +150,46 @@ VertexAttrib4bvNV(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib1NubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1ubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib2fNV(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2ubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]))); } static void GLAPIENTRY VertexAttrib3ubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3]))); @@ -191,7 +198,7 @@ VertexAttrib4NubvNV(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib4ubvNV(GLuint index, const GLubyte *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -201,32 +208,32 @@ VertexAttrib4ubvNV(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib1NsvNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1svNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NsvNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fNV(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2svNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NsvNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]))); } @@ -234,14 +241,14 @@ VertexAttrib3NsvNV(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib3svNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NsvNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3]))); @@ -250,7 +257,7 @@ VertexAttrib4NsvNV(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib4svNV(GLuint index, const GLshort *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -259,33 +266,33 @@ VertexAttrib4svNV(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib1NusvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1usvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NusvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fNV(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2usvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NusvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]))); } @@ -293,14 +300,14 @@ VertexAttrib3NusvNV(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib3usvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NusvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]))); @@ -309,7 +316,7 @@ VertexAttrib4NusvNV(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib4usvNV(GLuint index, const GLushort *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -318,32 +325,32 @@ VertexAttrib4usvNV(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib1NivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, INT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1ivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fNV(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2ivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]))); } @@ -351,14 +358,14 @@ VertexAttrib3NivNV(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib3ivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]))); @@ -367,7 +374,7 @@ VertexAttrib4NivNV(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib4ivNV(GLuint index, const GLint *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -376,33 +383,33 @@ VertexAttrib4ivNV(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib1NuivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fNV(get_dispatch(), (index, UINT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1uivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fNV(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NuivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fNV(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2uivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib2fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NuivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fNV(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]))); } @@ -410,14 +417,14 @@ VertexAttrib3NuivNV(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib3uivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib3fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NuivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fNV(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]))); @@ -426,7 +433,7 @@ VertexAttrib4NuivNV(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib4uivNV(GLuint index, const GLuint *v) { - CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fNV(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -435,25 +442,25 @@ VertexAttrib4uivNV(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib1fvNV(GLuint index, const GLfloat *v) { - CALL_VertexAttrib1fvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib1fvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib2fvNV(GLuint index, const GLfloat *v) { - CALL_VertexAttrib2fvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib2fvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib3fvNV(GLuint index, const GLfloat *v) { - CALL_VertexAttrib3fvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib3fvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib4fvNV(GLuint index, const GLfloat *v) { - CALL_VertexAttrib4fvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib4fvNV(get_dispatch(), (index, v)); } /* GL_DOUBLE attributes */ @@ -461,25 +468,25 @@ VertexAttrib4fvNV(GLuint index, const GLfloat *v) static void GLAPIENTRY VertexAttrib1dvNV(GLuint index, const GLdouble *v) { - CALL_VertexAttrib1dvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib1dvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib2dvNV(GLuint index, const GLdouble *v) { - CALL_VertexAttrib2dvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib2dvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib3dvNV(GLuint index, const GLdouble *v) { - CALL_VertexAttrib3dvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib3dvNV(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib4dvNV(GLuint index, const GLdouble *v) { - CALL_VertexAttrib4dvNV(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib4dvNV(get_dispatch(), (index, v)); } @@ -593,31 +600,31 @@ static const attrib_func AttribFuncsNV[2][4][NUM_TYPES] = { static void GLAPIENTRY VertexAttrib1NbvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1bvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NbvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); + CALL_VertexAttrib2fARB(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2bvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NbvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib3fARB(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]))); } @@ -625,13 +632,13 @@ VertexAttrib3NbvARB(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib3bvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NbvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), + CALL_VertexAttrib4fARB(get_dispatch(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3]))); @@ -640,7 +647,7 @@ VertexAttrib4NbvARB(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib4bvARB(GLuint index, const GLbyte *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } /* GL_UNSIGNED_BYTE attributes */ @@ -648,19 +655,19 @@ VertexAttrib4bvARB(GLuint index, const GLbyte *v) static void GLAPIENTRY VertexAttrib1NubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1ubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, + CALL_VertexAttrib2fARB(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]))); } @@ -668,14 +675,14 @@ VertexAttrib2NubvARB(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib2ubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, + CALL_VertexAttrib3fARB(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]))); @@ -683,7 +690,7 @@ VertexAttrib3NubvARB(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib3ubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); @@ -692,7 +699,7 @@ VertexAttrib3ubvARB(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib4NubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), + CALL_VertexAttrib4fARB(get_dispatch(), (index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), @@ -703,7 +710,7 @@ VertexAttrib4NubvARB(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib4ubvARB(GLuint index, const GLubyte *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); @@ -714,19 +721,19 @@ VertexAttrib4ubvARB(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttrib1NsvARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1svARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NsvARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), + CALL_VertexAttrib2fARB(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]))); } @@ -734,14 +741,14 @@ VertexAttrib2NsvARB(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib2svARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NsvARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), + CALL_VertexAttrib3fARB(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), @@ -751,7 +758,7 @@ VertexAttrib3NsvARB(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib3svARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } @@ -759,7 +766,7 @@ VertexAttrib3svARB(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib4NsvARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), + CALL_VertexAttrib4fARB(get_dispatch(), (index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), @@ -770,7 +777,7 @@ VertexAttrib4NsvARB(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib4svARB(GLuint index, const GLshort *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -779,33 +786,33 @@ VertexAttrib4svARB(GLuint index, const GLshort *v) static void GLAPIENTRY VertexAttrib1NusvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1usvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NusvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fARB(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2usvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NusvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fARB(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]))); } @@ -813,14 +820,14 @@ VertexAttrib3NusvARB(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib3usvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NusvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fARB(get_dispatch(), (index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3]))); @@ -829,7 +836,7 @@ VertexAttrib4NusvARB(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib4usvARB(GLuint index, const GLushort *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } /* GL_INT attributes */ @@ -837,33 +844,33 @@ VertexAttrib4usvARB(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttrib1NivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, INT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1ivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fARB(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2ivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fARB(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]))); } @@ -871,14 +878,14 @@ VertexAttrib3NivARB(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib3ivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fARB(get_dispatch(), (index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3]))); @@ -887,7 +894,7 @@ VertexAttrib4NivARB(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib4ivARB(GLuint index, const GLint *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -896,33 +903,33 @@ VertexAttrib4ivARB(GLuint index, const GLint *v) static void GLAPIENTRY VertexAttrib1NuivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]))); + CALL_VertexAttrib1fARB(get_dispatch(), (index, UINT_TO_FLOAT(v[0]))); } static void GLAPIENTRY VertexAttrib1uivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); + CALL_VertexAttrib1fARB(get_dispatch(), (index, (GLfloat)v[0])); } static void GLAPIENTRY VertexAttrib2NuivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib2fARB(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]))); } static void GLAPIENTRY VertexAttrib2uivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib2fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1])); } static void GLAPIENTRY VertexAttrib3NuivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib3fARB(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]))); } @@ -930,14 +937,14 @@ VertexAttrib3NuivARB(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib3uivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], + CALL_VertexAttrib3fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); } static void GLAPIENTRY VertexAttrib4NuivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), + CALL_VertexAttrib4fARB(get_dispatch(), (index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3]))); @@ -946,7 +953,7 @@ VertexAttrib4NuivARB(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib4uivARB(GLuint index, const GLuint *v) { - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], + CALL_VertexAttrib4fARB(get_dispatch(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); } @@ -955,25 +962,25 @@ VertexAttrib4uivARB(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttrib1fvARB(GLuint index, const GLfloat *v) { - CALL_VertexAttrib1fvARB(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib1fvARB(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib2fvARB(GLuint index, const GLfloat *v) { - CALL_VertexAttrib2fvARB(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib2fvARB(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib3fvARB(GLuint index, const GLfloat *v) { - CALL_VertexAttrib3fvARB(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib3fvARB(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib4fvARB(GLuint index, const GLfloat *v) { - CALL_VertexAttrib4fvARB(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib4fvARB(get_dispatch(), (index, v)); } /* GL_DOUBLE attributes */ @@ -981,25 +988,25 @@ VertexAttrib4fvARB(GLuint index, const GLfloat *v) static void GLAPIENTRY VertexAttrib1dvARB(GLuint index, const GLdouble *v) { - CALL_VertexAttrib1dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib1dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib2dvARB(GLuint index, const GLdouble *v) { - CALL_VertexAttrib2dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib2dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib3dvARB(GLuint index, const GLdouble *v) { - CALL_VertexAttrib3dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib3dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttrib4dvARB(GLuint index, const GLdouble *v) { - CALL_VertexAttrib4dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttrib4dv(get_dispatch(), (index, v)); } @@ -1009,50 +1016,50 @@ VertexAttrib4dvARB(GLuint index, const GLdouble *v) static void GLAPIENTRY VertexAttribI1bv(GLuint index, const GLbyte *v) { - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1iEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2bv(GLuint index, const GLbyte *v) { - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2iEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3bv(GLuint index, const GLbyte *v) { - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3iEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4bv(GLuint index, const GLbyte *v) { - CALL_VertexAttribI4bv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4bv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribI1ubv(GLuint index, const GLubyte *v) { - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1uiEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2ubv(GLuint index, const GLubyte *v) { - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2uiEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3ubv(GLuint index, const GLubyte *v) { - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3uiEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4ubv(GLuint index, const GLubyte *v) { - CALL_VertexAttribI4ubv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4ubv(get_dispatch(), (index, v)); } @@ -1060,50 +1067,50 @@ VertexAttribI4ubv(GLuint index, const GLubyte *v) static void GLAPIENTRY VertexAttribI1sv(GLuint index, const GLshort *v) { - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1iEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2sv(GLuint index, const GLshort *v) { - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2iEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3sv(GLuint index, const GLshort *v) { - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3iEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4sv(GLuint index, const GLshort *v) { - CALL_VertexAttribI4sv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4sv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribI1usv(GLuint index, const GLushort *v) { - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1uiEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2usv(GLuint index, const GLushort *v) { - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2uiEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3usv(GLuint index, const GLushort *v) { - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3uiEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4usv(GLuint index, const GLushort *v) { - CALL_VertexAttribI4usv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4usv(get_dispatch(), (index, v)); } @@ -1111,50 +1118,50 @@ VertexAttribI4usv(GLuint index, const GLushort *v) static void GLAPIENTRY VertexAttribI1iv(GLuint index, const GLint *v) { - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1iEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2iv(GLuint index, const GLint *v) { - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2iEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3iv(GLuint index, const GLint *v) { - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3iEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4iv(GLuint index, const GLint *v) { - CALL_VertexAttribI4ivEXT(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4ivEXT(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribI1uiv(GLuint index, const GLuint *v) { - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); + CALL_VertexAttribI1uiEXT(get_dispatch(), (index, v[0])); } static void GLAPIENTRY VertexAttribI2uiv(GLuint index, const GLuint *v) { - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); + CALL_VertexAttribI2uiEXT(get_dispatch(), (index, v[0], v[1])); } static void GLAPIENTRY VertexAttribI3uiv(GLuint index, const GLuint *v) { - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); + CALL_VertexAttribI3uiEXT(get_dispatch(), (index, v[0], v[1], v[2])); } static void GLAPIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v) { - CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v)); + CALL_VertexAttribI4uivEXT(get_dispatch(), (index, v)); } /* GL_DOUBLE unconverted attributes */ @@ -1162,25 +1169,25 @@ VertexAttribI4uiv(GLuint index, const GLuint *v) static void GLAPIENTRY VertexAttribL1dv(GLuint index, const GLdouble *v) { - CALL_VertexAttribL1dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribL1dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribL2dv(GLuint index, const GLdouble *v) { - CALL_VertexAttribL2dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribL2dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribL3dv(GLuint index, const GLdouble *v) { - CALL_VertexAttribL3dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribL3dv(get_dispatch(), (index, v)); } static void GLAPIENTRY VertexAttribL4dv(GLuint index, const GLdouble *v) { - CALL_VertexAttribL4dv(GET_DISPATCH(), (index, v)); + CALL_VertexAttribL4dv(get_dispatch(), (index, v)); } /* @@ -1479,7 +1486,7 @@ _ae_ArrayElement(GLint elt) * then we call PrimitiveRestartNV and return. */ if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) { - CALL_PrimitiveRestartNV(GET_DISPATCH(), ()); + CALL_PrimitiveRestartNV(ctx->CurrentServerDispatch, ()); return; } diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index ba4b199..cb7e1d3 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -37,6 +37,14 @@ #include "main/dispatch.h" #include "main/context.h" +static struct _glapi_table * +get_dispatch(void) +{ + GET_CURRENT_CONTEXT(ctx); + return ctx->CurrentServerDispatch; +} + + /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc * calls to a smaller set of driver-provided formats. Currently just * go back to dispatch to find these (eg. call glNormal3f directly), @@ -46,43 +54,43 @@ * 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) CALL_Color4f(GET_DISPATCH(), (r,g,b,a)) -#define VERTEX2(x,y) CALL_Vertex2f(GET_DISPATCH(), (x,y)) -#define VERTEX3(x,y,z) CALL_Vertex3f(GET_DISPATCH(), (x,y,z)) -#define VERTEX4(x,y,z,w) CALL_Vertex4f(GET_DISPATCH(), (x,y,z,w)) -#define NORMAL(x,y,z) CALL_Normal3f(GET_DISPATCH(), (x,y,z)) -#define TEXCOORD1(s) CALL_TexCoord1f(GET_DISPATCH(), (s)) -#define TEXCOORD2(s,t) CALL_TexCoord2f(GET_DISPATCH(), (s,t)) -#define TEXCOORD3(s,t,u) CALL_TexCoord3f(GET_DISPATCH(), (s,t,u)) -#define TEXCOORD4(s,t,u,v) CALL_TexCoord4f(GET_DISPATCH(), (s,t,u,v)) -#define INDEX(c) CALL_Indexf(GET_DISPATCH(), (c)) -#define MULTI_TEXCOORD1(z,s) CALL_MultiTexCoord1fARB(GET_DISPATCH(), (z,s)) -#define MULTI_TEXCOORD2(z,s,t) CALL_MultiTexCoord2fARB(GET_DISPATCH(), (z,s,t)) -#define MULTI_TEXCOORD3(z,s,t,u) CALL_MultiTexCoord3fARB(GET_DISPATCH(), (z,s,t,u)) -#define MULTI_TEXCOORD4(z,s,t,u,v) CALL_MultiTexCoord4fARB(GET_DISPATCH(), (z,s,t,u,v)) -#define EVALCOORD1(x) CALL_EvalCoord1f(GET_DISPATCH(), (x)) -#define EVALCOORD2(x,y) CALL_EvalCoord2f(GET_DISPATCH(), (x,y)) -#define MATERIALFV(a,b,c) CALL_Materialfv(GET_DISPATCH(), (a,b,c)) -#define RECTF(a,b,c,d) CALL_Rectf(GET_DISPATCH(), (a,b,c,d)) - -#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x)) -#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c)) - -#define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x)) -#define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y)) -#define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z)) -#define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w)) - -#define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x)) -#define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y)) -#define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z)) -#define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w)) - -#define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x)) -#define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x)) -#define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w)) - -#define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w)) +#define COLORF(r,g,b,a) CALL_Color4f(get_dispatch(), (r,g,b,a)) +#define VERTEX2(x,y) CALL_Vertex2f(get_dispatch(), (x,y)) +#define VERTEX3(x,y,z) CALL_Vertex3f(get_dispatch(), (x,y,z)) +#define VERTEX4(x,y,z,w) CALL_Vertex4f(get_dispatch(), (x,y,z,w)) +#define NORMAL(x,y,z) CALL_Normal3f(get_dispatch(), (x,y,z)) +#define TEXCOORD1(s) CALL_TexCoord1f(get_dispatch(), (s)) +#define TEXCOORD2(s,t) CALL_TexCoord2f(get_dispatch(), (s,t)) +#define TEXCOORD3(s,t,u) CALL_TexCoord3f(get_dispatch(), (s,t,u)) +#define TEXCOORD4(s,t,u,v) CALL_TexCoord4f(get_dispatch(), (s,t,u,v)) +#define INDEX(c) CALL_Indexf(get_dispatch(), (c)) +#define MULTI_TEXCOORD1(z,s) CALL_MultiTexCoord1fARB(get_dispatch(), (z,s)) +#define MULTI_TEXCOORD2(z,s,t) CALL_MultiTexCoord2fARB(get_dispatch(), (z,s,t)) +#define MULTI_TEXCOORD3(z,s,t,u) CALL_MultiTexCoord3fARB(get_dispatch(), (z,s,t,u)) +#define MULTI_TEXCOORD4(z,s,t,u,v) CALL_MultiTexCoord4fARB(get_dispatch(), (z,s,t,u,v)) +#define EVALCOORD1(x) CALL_EvalCoord1f(get_dispatch(), (x)) +#define EVALCOORD2(x,y) CALL_EvalCoord2f(get_dispatch(), (x,y)) +#define MATERIALFV(a,b,c) CALL_Materialfv(get_dispatch(), (a,b,c)) +#define RECTF(a,b,c,d) CALL_Rectf(get_dispatch(), (a,b,c,d)) + +#define FOGCOORDF(x) CALL_FogCoordfEXT(get_dispatch(), (x)) +#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(get_dispatch(), (a,b,c)) + +#define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(get_dispatch(), (index,x)) +#define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(get_dispatch(), (index,x,y)) +#define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(get_dispatch(), (index,x,y,z)) +#define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(get_dispatch(), (index,x,y,z,w)) + +#define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(get_dispatch(), (index,x)) +#define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(get_dispatch(), (index,x,y)) +#define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(get_dispatch(), (index,x,y,z)) +#define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(get_dispatch(), (index,x,y,z,w)) + +#define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(get_dispatch(), (index,x)) +#define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(get_dispatch(), (index,x)) +#define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(get_dispatch(), (index,x,y,z,w)) + +#define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(get_dispatch(), (index,x,y,z,w)) void GLAPIENTRY _mesa_Color3b( GLbyte red, GLbyte green, GLbyte blue ) @@ -353,7 +361,7 @@ _mesa_Indexubv( const GLubyte *c ) void GLAPIENTRY _mesa_EdgeFlagv(const GLboolean *flag) { - CALL_EdgeFlag(GET_DISPATCH(), (*flag)); + CALL_EdgeFlag(get_dispatch(), (*flag)); } diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 686a065..8879fa9 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -383,12 +383,14 @@ _mesa_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - CALL_Begin(GET_DISPATCH(), (GL_QUADS)); - CALL_Vertex2f(GET_DISPATCH(), (x1, y1)); - CALL_Vertex2f(GET_DISPATCH(), (x2, y1)); - CALL_Vertex2f(GET_DISPATCH(), (x2, y2)); - CALL_Vertex2f(GET_DISPATCH(), (x1, y2)); - CALL_End(GET_DISPATCH(), ()); + CALL_Begin(ctx->CurrentServerDispatch, (GL_QUADS)); + /* Begin can change CurrentServerDispatch. */ + struct _glapi_table *dispatch = ctx->CurrentServerDispatch; + CALL_Vertex2f(dispatch, (x1, y1)); + CALL_Vertex2f(dispatch, (x2, y1)); + CALL_Vertex2f(dispatch, (x2, y2)); + CALL_Vertex2f(dispatch, (x1, y2)); + CALL_End(dispatch, ()); } @@ -420,11 +422,14 @@ _mesa_EvalMesh1(GLenum mode, GLint i1, GLint i2) du = ctx->Eval.MapGrid1du; u = ctx->Eval.MapGrid1u1 + i1 * du; - CALL_Begin(GET_DISPATCH(), (prim)); + + CALL_Begin(ctx->CurrentServerDispatch, (prim)); + /* Begin can change CurrentServerDispatch. */ + struct _glapi_table *dispatch = ctx->CurrentServerDispatch; for (i = i1; i <= i2; i++, u += du) { - CALL_EvalCoord1f(GET_DISPATCH(), (u)); + CALL_EvalCoord1f(dispatch, (u)); } - CALL_End(GET_DISPATCH(), ()); + CALL_End(dispatch, ()); } @@ -455,40 +460,50 @@ _mesa_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) v1 = ctx->Eval.MapGrid2v1 + j1 * dv; u1 = ctx->Eval.MapGrid2u1 + i1 * du; + struct _glapi_table *dispatch; + switch (mode) { case GL_POINT: - CALL_Begin(GET_DISPATCH(), (GL_POINTS)); + CALL_Begin(ctx->CurrentServerDispatch, (GL_POINTS)); + /* Begin can change CurrentServerDispatch. */ + dispatch = ctx->CurrentServerDispatch; for (v = v1, j = j1; j <= j2; j++, v += dv) { for (u = u1, i = i1; i <= i2; i++, u += du) { - CALL_EvalCoord2f(GET_DISPATCH(), (u, v)); + CALL_EvalCoord2f(dispatch, (u, v)); } } - CALL_End(GET_DISPATCH(), ()); + CALL_End(dispatch, ()); break; case GL_LINE: for (v = v1, j = j1; j <= j2; j++, v += dv) { - CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP)); + CALL_Begin(ctx->CurrentServerDispatch, (GL_LINE_STRIP)); + /* Begin can change CurrentServerDispatch. */ + dispatch = ctx->CurrentServerDispatch; for (u = u1, i = i1; i <= i2; i++, u += du) { - CALL_EvalCoord2f(GET_DISPATCH(), (u, v)); + CALL_EvalCoord2f(dispatch, (u, v)); } - CALL_End(GET_DISPATCH(), ()); + CALL_End(dispatch, ()); } for (u = u1, i = i1; i <= i2; i++, u += du) { - CALL_Begin(GET_DISPATCH(), (GL_LINE_STRIP)); + CALL_Begin(ctx->CurrentServerDispatch, (GL_LINE_STRIP)); + /* Begin can change CurrentServerDispatch. */ + dispatch = ctx->CurrentServerDispatch; for (v = v1, j = j1; j <= j2; j++, v += dv) { - CALL_EvalCoord2f(GET_DISPATCH(), (u, v)); + CALL_EvalCoord2f(dispatch, (u, v)); } - CALL_End(GET_DISPATCH(), ()); + CALL_End(dispatch, ()); } break; case GL_FILL: for (v = v1, j = j1; j < j2; j++, v += dv) { - CALL_Begin(GET_DISPATCH(), (GL_TRIANGLE_STRIP)); + CALL_Begin(ctx->CurrentServerDispatch, (GL_TRIANGLE_STRIP)); + /* Begin can change CurrentServerDispatch. */ + dispatch = ctx->CurrentServerDispatch; for (u = u1, i = i1; i <= i2; i++, u += du) { - CALL_EvalCoord2f(GET_DISPATCH(), (u, v)); - CALL_EvalCoord2f(GET_DISPATCH(), (u, v + dv)); + CALL_EvalCoord2f(dispatch, (u, v)); + CALL_EvalCoord2f(dispatch, (u, v + dv)); } - CALL_End(GET_DISPATCH(), ()); + CALL_End(dispatch, ()); } break; } diff --git a/src/mesa/vbo/vbo_exec_eval.c b/src/mesa/vbo/vbo_exec_eval.c index 9754c20..7873f04 100644 --- a/src/mesa/vbo/vbo_exec_eval.c +++ b/src/mesa/vbo/vbo_exec_eval.c @@ -159,9 +159,9 @@ void vbo_exec_do_EvalCoord1f(struct vbo_exec_context *exec, GLfloat u) map->Order); if (exec->eval.map1[0].sz == 4) - CALL_Vertex4fv(GET_DISPATCH(), ( vertex )); + CALL_Vertex4fv(exec->ctx->CurrentServerDispatch, ( vertex )); else - CALL_Vertex3fv(GET_DISPATCH(), ( vertex )); + CALL_Vertex3fv(exec->ctx->CurrentServerDispatch, ( vertex )); } } @@ -239,9 +239,9 @@ void vbo_exec_do_EvalCoord2f( struct vbo_exec_context *exec, } if (exec->vtx.attr[VBO_ATTRIB_POS].size == 4) - CALL_Vertex4fv(GET_DISPATCH(), ( vertex )); + CALL_Vertex4fv(exec->ctx->CurrentServerDispatch, ( vertex )); else - CALL_Vertex3fv(GET_DISPATCH(), ( vertex )); + CALL_Vertex3fv(exec->ctx->CurrentServerDispatch, ( vertex )); } } diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 4e138f2..33ad61e 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1227,7 +1227,7 @@ _save_PrimitiveRestartNV(void) bool no_current_update = save->no_current_update; /* restart primitive */ - CALL_End(GET_DISPATCH(), ()); + CALL_End(ctx->CurrentServerDispatch, ()); vbo_save_NotifyBegin(ctx, curPrim, no_current_update); } } @@ -1242,12 +1242,14 @@ static void GLAPIENTRY _save_OBE_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { GET_CURRENT_CONTEXT(ctx); + struct _glapi_table *dispatch = ctx->CurrentServerDispatch; + vbo_save_NotifyBegin(ctx, GL_QUADS, false); - CALL_Vertex2f(GET_DISPATCH(), (x1, y1)); - CALL_Vertex2f(GET_DISPATCH(), (x2, y1)); - CALL_Vertex2f(GET_DISPATCH(), (x2, y2)); - CALL_Vertex2f(GET_DISPATCH(), (x1, y2)); - CALL_End(GET_DISPATCH(), ()); + CALL_Vertex2f(dispatch, (x1, y1)); + CALL_Vertex2f(dispatch, (x2, y1)); + CALL_Vertex2f(dispatch, (x2, y2)); + CALL_Vertex2f(dispatch, (x1, y2)); + CALL_End(dispatch, ()); } @@ -1280,7 +1282,7 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count) for (i = 0; i < count; i++) _mesa_array_element(ctx, start + i); - CALL_End(GET_DISPATCH(), ()); + CALL_End(ctx->CurrentServerDispatch, ()); _mesa_vao_unmap_arrays(ctx, vao); } @@ -1335,7 +1337,7 @@ array_element(struct gl_context *ctx, */ if (ctx->Array._PrimitiveRestart && elt == ctx->Array._RestartIndex[index_size - 1]) { - CALL_PrimitiveRestartNV(GET_DISPATCH(), ()); + CALL_PrimitiveRestartNV(ctx->CurrentServerDispatch, ()); return; } @@ -1403,7 +1405,7 @@ _save_OBE_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, break; } - CALL_End(GET_DISPATCH(), ()); + CALL_End(ctx->CurrentServerDispatch, ()); _mesa_vao_unmap(ctx, vao); } @@ -1456,11 +1458,13 @@ static void GLAPIENTRY _save_OBE_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount) { + GET_CURRENT_CONTEXT(ctx); + struct _glapi_table *dispatch = ctx->CurrentServerDispatch; GLsizei i; for (i = 0; i < primcount; i++) { if (count[i] > 0) { - CALL_DrawElements(GET_DISPATCH(), (mode, count[i], type, indices[i])); + CALL_DrawElements(dispatch, (mode, count[i], type, indices[i])); } } } @@ -1473,11 +1477,13 @@ _save_OBE_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLsizei primcount, const GLint *basevertex) { + GET_CURRENT_CONTEXT(ctx); + struct _glapi_table *dispatch = ctx->CurrentServerDispatch; GLsizei i; for (i = 0; i < primcount; i++) { if (count[i] > 0) { - CALL_DrawElementsBaseVertex(GET_DISPATCH(), (mode, count[i], type, + CALL_DrawElementsBaseVertex(dispatch, (mode, count[i], type, indices[i], basevertex[i])); } diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c index 9cedc6c..fb5c4d4 100644 --- a/src/mesa/vbo/vbo_save_loopback.c +++ b/src/mesa/vbo/vbo_save_loopback.c @@ -112,7 +112,7 @@ loopback_prim(struct gl_context *ctx, stride); if (prim->begin) { - CALL_Begin(GET_DISPATCH(), (prim->mode)); + CALL_Begin(ctx->Exec, (prim->mode)); } else { start += wrap_count; @@ -128,7 +128,7 @@ loopback_prim(struct gl_context *ctx, } if (prim->end) { - CALL_End(GET_DISPATCH(), ()); + CALL_End(ctx->Exec, ()); } } -- 2.7.4