diff options
author | Brian Paul <[email protected]> | 2004-11-27 20:07:08 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-11-27 20:07:08 +0000 |
commit | b5b8d22c4ee921dff99b898a5907023b20670a27 (patch) | |
tree | f86cfa06e3fbe8c3d73fc665e79294c0257d53ff /src/mesa/main | |
parent | 0699b0bb171ffba453222154c4b2c047a30a2a8b (diff) |
Change the dispatch offsets for the VertexAttrib*NV functions so they don't
alias with the corresponding ARB functions.
GL_ARB_vertex_shader (and OpenGL 2.0's) VertexAttrib functions don't alias
with conventional vertex attributes, as GL_NV_vertex_program does.
So, the ARB and NV version of VertexAttrib need to be distinct.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/api_arrayelt.c | 249 | ||||
-rw-r--r-- | src/mesa/main/api_loopback.c | 267 | ||||
-rw-r--r-- | src/mesa/main/api_noop.c | 113 | ||||
-rw-r--r-- | src/mesa/main/api_noop.h | 71 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 10 | ||||
-rw-r--r-- | src/mesa/main/dlist.c | 374 | ||||
-rw-r--r-- | src/mesa/main/state.c | 6 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt.c | 10 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt_tmp.h | 62 |
9 files changed, 800 insertions, 362 deletions
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 626c92eca25..12ea41379cc 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -411,39 +411,39 @@ static const array_func FogCoordFuncs[8] = { /* GL_BYTE attributes */ -static void GLAPIENTRY VertexAttrib1Nbv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib1NbvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib1fNV)(index, BYTE_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1bv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib1bvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Nbv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib2NbvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib2fNV)(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2bv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib2bvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Nbv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib3NbvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib3fNV)(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3bv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib3bvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Nbv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib4NbvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib4fNV)(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), @@ -451,46 +451,46 @@ static void GLAPIENTRY VertexAttrib4Nbv(GLuint index, const GLbyte *v) BYTE_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4bv(GLuint index, const GLbyte *v) +static void GLAPIENTRY VertexAttrib4bvNV(GLuint index, const GLbyte *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_UNSIGNED_BYTE attributes */ -static void GLAPIENTRY VertexAttrib1Nubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib1NubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib1fNV)(index, UBYTE_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1ubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib1ubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Nubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib2NubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib2fNV)(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2ubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib2ubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Nubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib3NubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib3fNV)(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3ubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib3ubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Nubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib4NubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib4fNV)(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), @@ -498,47 +498,47 @@ static void GLAPIENTRY VertexAttrib4Nubv(GLuint index, const GLubyte *v) UBYTE_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4ubv(GLuint index, const GLubyte *v) +static void GLAPIENTRY VertexAttrib4ubvNV(GLuint index, const GLubyte *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_SHORT attributes */ -static void GLAPIENTRY VertexAttrib1Nsv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib1NsvNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib1fNV)(index, SHORT_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1sv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib1svNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Nsv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib2NsvNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib2fNV)(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2sv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib2svNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Nsv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib3NsvNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib3fNV)(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3sv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib3svNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Nsv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib4NsvNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib4fNV)(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), @@ -546,47 +546,47 @@ static void GLAPIENTRY VertexAttrib4Nsv(GLuint index, const GLshort *v) SHORT_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4sv(GLuint index, const GLshort *v) +static void GLAPIENTRY VertexAttrib4svNV(GLuint index, const GLshort *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_UNSIGNED_SHORT attributes */ -static void GLAPIENTRY VertexAttrib1Nusv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib1NusvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib1fNV)(index, USHORT_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1usv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib1usvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Nusv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib2NusvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib2fNV)(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2usv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib2usvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Nusv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib3NusvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib3fNV)(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3usv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib3usvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Nusv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib4NusvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib4fNV)(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), @@ -594,47 +594,47 @@ static void GLAPIENTRY VertexAttrib4Nusv(GLuint index, const GLushort *v) USHORT_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4usv(GLuint index, const GLushort *v) +static void GLAPIENTRY VertexAttrib4usvNV(GLuint index, const GLushort *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_INT attributes */ -static void GLAPIENTRY VertexAttrib1Niv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib1NivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib1fNV)(index, INT_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1iv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib1ivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Niv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib2NivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib2fNV)(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2iv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib2ivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Niv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib3NivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib3fNV)(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3iv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib3ivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Niv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib4NivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib4fNV)(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), @@ -642,47 +642,47 @@ static void GLAPIENTRY VertexAttrib4Niv(GLuint index, const GLint *v) INT_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4iv(GLuint index, const GLint *v) +static void GLAPIENTRY VertexAttrib4ivNV(GLuint index, const GLint *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_UNSIGNED_INT attributes */ -static void GLAPIENTRY VertexAttrib1Nuiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib1NuivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib1fNV)(index, UINT_TO_FLOAT(v[0])); } -static void GLAPIENTRY VertexAttrib1uiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib1uivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib1fNV)(index, v[0]); } -static void GLAPIENTRY VertexAttrib2Nuiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib2NuivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib2fNV)(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1])); } -static void GLAPIENTRY VertexAttrib2uiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib2uivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib2fNV)(index, v[0], v[1]); } -static void GLAPIENTRY VertexAttrib3Nuiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib3NuivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib3fNV)(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2])); } -static void GLAPIENTRY VertexAttrib3uiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib3uivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib3fNV)(index, v[0], v[1], v[2]); } -static void GLAPIENTRY VertexAttrib4Nuiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib4NuivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib4fNV)(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), @@ -690,51 +690,51 @@ static void GLAPIENTRY VertexAttrib4Nuiv(GLuint index, const GLuint *v) UINT_TO_FLOAT(v[3])); } -static void GLAPIENTRY VertexAttrib4uiv(GLuint index, const GLuint *v) +static void GLAPIENTRY VertexAttrib4uivNV(GLuint index, const GLuint *v) { GL_CALL(VertexAttrib4fNV)(index, v[0], v[1], v[2], v[3]); } /* GL_FLOAT attributes */ -static void GLAPIENTRY VertexAttrib1fv(GLuint index, const GLfloat *v) +static void GLAPIENTRY VertexAttrib1fvNV(GLuint index, const GLfloat *v) { GL_CALL(VertexAttrib1fvNV)(index, v); } -static void GLAPIENTRY VertexAttrib2fv(GLuint index, const GLfloat *v) +static void GLAPIENTRY VertexAttrib2fvNV(GLuint index, const GLfloat *v) { GL_CALL(VertexAttrib2fvNV)(index, v); } -static void GLAPIENTRY VertexAttrib3fv(GLuint index, const GLfloat *v) +static void GLAPIENTRY VertexAttrib3fvNV(GLuint index, const GLfloat *v) { GL_CALL(VertexAttrib3fvNV)(index, v); } -static void GLAPIENTRY VertexAttrib4fv(GLuint index, const GLfloat *v) +static void GLAPIENTRY VertexAttrib4fvNV(GLuint index, const GLfloat *v) { GL_CALL(VertexAttrib4fvNV)(index, v); } /* GL_DOUBLE attributes */ -static void GLAPIENTRY VertexAttrib1dv(GLuint index, const GLdouble *v) +static void GLAPIENTRY VertexAttrib1dvNV(GLuint index, const GLdouble *v) { GL_CALL(VertexAttrib1dvNV)(index, v); } -static void GLAPIENTRY VertexAttrib2dv(GLuint index, const GLdouble *v) +static void GLAPIENTRY VertexAttrib2dvNV(GLuint index, const GLdouble *v) { GL_CALL(VertexAttrib2dvNV)(index, v); } -static void GLAPIENTRY VertexAttrib3dv(GLuint index, const GLdouble *v) +static void GLAPIENTRY VertexAttrib3dvNV(GLuint index, const GLdouble *v) { GL_CALL(VertexAttrib3dvNV)(index, v); } -static void GLAPIENTRY VertexAttrib4dv(GLuint index, const GLdouble *v) +static void GLAPIENTRY VertexAttrib4dvNV(GLuint index, const GLdouble *v) { GL_CALL(VertexAttrib4dvNV)(index, v); } @@ -743,99 +743,99 @@ static void GLAPIENTRY VertexAttrib4dv(GLuint index, const GLdouble *v) /* * Array [size][type] of VertexAttrib functions */ -static const attrib_func AttribFuncs[2][4][8] = { +static attrib_func AttribFuncsNV[2][4][8] = { { /* non-normalized */ { /* size 1 */ - (attrib_func) VertexAttrib1bv, - (attrib_func) VertexAttrib1ubv, - (attrib_func) VertexAttrib1sv, - (attrib_func) VertexAttrib1usv, - (attrib_func) VertexAttrib1iv, - (attrib_func) VertexAttrib1uiv, - (attrib_func) VertexAttrib1fv, - (attrib_func) VertexAttrib1dv + (attrib_func) VertexAttrib1bvNV, + (attrib_func) VertexAttrib1ubvNV, + (attrib_func) VertexAttrib1svNV, + (attrib_func) VertexAttrib1usvNV, + (attrib_func) VertexAttrib1ivNV, + (attrib_func) VertexAttrib1uivNV, + (attrib_func) VertexAttrib1fvNV, + (attrib_func) VertexAttrib1dvNV }, { /* size 2 */ - (attrib_func) VertexAttrib2bv, - (attrib_func) VertexAttrib2ubv, - (attrib_func) VertexAttrib2sv, - (attrib_func) VertexAttrib2usv, - (attrib_func) VertexAttrib2iv, - (attrib_func) VertexAttrib2uiv, - (attrib_func) VertexAttrib2fv, - (attrib_func) VertexAttrib2dv + (attrib_func) VertexAttrib2bvNV, + (attrib_func) VertexAttrib2ubvNV, + (attrib_func) VertexAttrib2svNV, + (attrib_func) VertexAttrib2usvNV, + (attrib_func) VertexAttrib2ivNV, + (attrib_func) VertexAttrib2uivNV, + (attrib_func) VertexAttrib2fvNV, + (attrib_func) VertexAttrib2dvNV }, { /* size 3 */ - (attrib_func) VertexAttrib3bv, - (attrib_func) VertexAttrib3ubv, - (attrib_func) VertexAttrib3sv, - (attrib_func) VertexAttrib3usv, - (attrib_func) VertexAttrib3iv, - (attrib_func) VertexAttrib3uiv, - (attrib_func) VertexAttrib3fv, - (attrib_func) VertexAttrib3dv + (attrib_func) VertexAttrib3bvNV, + (attrib_func) VertexAttrib3ubvNV, + (attrib_func) VertexAttrib3svNV, + (attrib_func) VertexAttrib3usvNV, + (attrib_func) VertexAttrib3ivNV, + (attrib_func) VertexAttrib3uivNV, + (attrib_func) VertexAttrib3fvNV, + (attrib_func) VertexAttrib3dvNV }, { /* size 4 */ - (attrib_func) VertexAttrib4bv, - (attrib_func) VertexAttrib4ubv, - (attrib_func) VertexAttrib4sv, - (attrib_func) VertexAttrib4usv, - (attrib_func) VertexAttrib4iv, - (attrib_func) VertexAttrib4uiv, - (attrib_func) VertexAttrib4fv, - (attrib_func) VertexAttrib4dv + (attrib_func) VertexAttrib4bvNV, + (attrib_func) VertexAttrib4ubvNV, + (attrib_func) VertexAttrib4svNV, + (attrib_func) VertexAttrib4usvNV, + (attrib_func) VertexAttrib4ivNV, + (attrib_func) VertexAttrib4uivNV, + (attrib_func) VertexAttrib4fvNV, + (attrib_func) VertexAttrib4dvNV } }, { /* normalized (except for float/double) */ { /* size 1 */ - (attrib_func) VertexAttrib1Nbv, - (attrib_func) VertexAttrib1Nubv, - (attrib_func) VertexAttrib1Nsv, - (attrib_func) VertexAttrib1Nusv, - (attrib_func) VertexAttrib1Niv, - (attrib_func) VertexAttrib1Nuiv, - (attrib_func) VertexAttrib1fv, - (attrib_func) VertexAttrib1dv + (attrib_func) VertexAttrib1NbvNV, + (attrib_func) VertexAttrib1NubvNV, + (attrib_func) VertexAttrib1NsvNV, + (attrib_func) VertexAttrib1NusvNV, + (attrib_func) VertexAttrib1NivNV, + (attrib_func) VertexAttrib1NuivNV, + (attrib_func) VertexAttrib1fvNV, + (attrib_func) VertexAttrib1dvNV }, { /* size 2 */ - (attrib_func) VertexAttrib2Nbv, - (attrib_func) VertexAttrib2Nubv, - (attrib_func) VertexAttrib2Nsv, - (attrib_func) VertexAttrib2Nusv, - (attrib_func) VertexAttrib2Niv, - (attrib_func) VertexAttrib2Nuiv, - (attrib_func) VertexAttrib2fv, - (attrib_func) VertexAttrib2dv + (attrib_func) VertexAttrib2NbvNV, + (attrib_func) VertexAttrib2NubvNV, + (attrib_func) VertexAttrib2NsvNV, + (attrib_func) VertexAttrib2NusvNV, + (attrib_func) VertexAttrib2NivNV, + (attrib_func) VertexAttrib2NuivNV, + (attrib_func) VertexAttrib2fvNV, + (attrib_func) VertexAttrib2dvNV }, { /* size 3 */ - (attrib_func) VertexAttrib3Nbv, - (attrib_func) VertexAttrib3Nubv, - (attrib_func) VertexAttrib3Nsv, - (attrib_func) VertexAttrib3Nusv, - (attrib_func) VertexAttrib3Niv, - (attrib_func) VertexAttrib3Nuiv, - (attrib_func) VertexAttrib3fv, - (attrib_func) VertexAttrib3dv + (attrib_func) VertexAttrib3NbvNV, + (attrib_func) VertexAttrib3NubvNV, + (attrib_func) VertexAttrib3NsvNV, + (attrib_func) VertexAttrib3NusvNV, + (attrib_func) VertexAttrib3NivNV, + (attrib_func) VertexAttrib3NuivNV, + (attrib_func) VertexAttrib3fvNV, + (attrib_func) VertexAttrib3dvNV }, { /* size 4 */ - (attrib_func) VertexAttrib4Nbv, - (attrib_func) VertexAttrib4Nubv, - (attrib_func) VertexAttrib4Nsv, - (attrib_func) VertexAttrib4Nusv, - (attrib_func) VertexAttrib4Niv, - (attrib_func) VertexAttrib4Nuiv, - (attrib_func) VertexAttrib4fv, - (attrib_func) VertexAttrib4dv + (attrib_func) VertexAttrib4NbvNV, + (attrib_func) VertexAttrib4NubvNV, + (attrib_func) VertexAttrib4NsvNV, + (attrib_func) VertexAttrib4NusvNV, + (attrib_func) VertexAttrib4NivNV, + (attrib_func) VertexAttrib4NuivNV, + (attrib_func) VertexAttrib4fvNV, + (attrib_func) VertexAttrib4dvNV } } }; @@ -923,7 +923,7 @@ static void _ae_update_state( GLcontext *ctx ) */ struct gl_client_array *attribArray = &ctx->Array.TexCoord[i]; at->array = attribArray; - at->func = AttribFuncs[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)]; + at->func = AttribFuncsNV[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)]; at->index = VERT_ATTRIB_TEX0 + i; at++; } @@ -939,7 +939,7 @@ static void _ae_update_state( GLcontext *ctx ) * change from one execution of _ae_loopback_array_elt() to * the next. Doing so caused UT to break. */ - at->func = AttribFuncs[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)]; + at->func = AttribFuncsNV[at->array->Normalized][at->array->Size-1][TYPE_IDX(at->array->Type)]; at->index = i; at++; } @@ -1004,7 +1004,6 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) } - void _ae_invalidate_state( GLcontext *ctx, GLuint new_state ) { AE_CONTEXT(ctx)->NewState |= new_state; diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 3281caf3c99..29215697572 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -65,15 +65,16 @@ #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) 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) +#define ATTRIB1NV(index,x) GL_CALL(VertexAttrib1fNV)(index,x) +#define ATTRIB2NV(index,x,y) GL_CALL(VertexAttrib2fNV)(index,x,y) +#define ATTRIB3NV(index,x,y,z) GL_CALL(VertexAttrib3fNV)(index,x,y,z) +#define ATTRIB4NV(index,x,y,z,w) GL_CALL(VertexAttrib4fNV)(index,x,y,z,w) +#define ATTRIB1ARB(index,x) GL_CALL(VertexAttrib1fARB)(index,x) +#define ATTRIB2ARB(index,x,y) GL_CALL(VertexAttrib2fARB)(index,x,y) +#define ATTRIB3ARB(index,x,y,z) GL_CALL(VertexAttrib3fARB)(index,x,y,z) +#define ATTRIB4ARB(index,x,y,z,w) GL_CALL(VertexAttrib4fARB)(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 ) @@ -1024,159 +1025,118 @@ loopback_SecondaryColor3ubvEXT_f( const GLubyte *v ) /* - * GL_NV_vertex_program + * GL_NV_vertex_program: + * Always loop-back to one of the VertexAttrib[1234]f[v]NV functions. */ static void GLAPIENTRY loopback_VertexAttrib1sNV(GLuint index, GLshort x) { - ATTRIB1(index, (GLfloat) x); -} - -static void GLAPIENTRY -loopback_VertexAttrib1fNV(GLuint index, GLfloat x) -{ - ATTRIB1(index, x); + ATTRIB1NV(index, (GLfloat) x); } static void GLAPIENTRY loopback_VertexAttrib1dNV(GLuint index, GLdouble x) { - ATTRIB1(index, (GLfloat) x); + ATTRIB1NV(index, (GLfloat) x); } static void GLAPIENTRY loopback_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y) { - ATTRIB2(index, (GLfloat) x, y); -} - -static void GLAPIENTRY -loopback_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) -{ - ATTRIB2(index, (GLfloat) x, y); + ATTRIB2NV(index, (GLfloat) x, y); } static void GLAPIENTRY loopback_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) { - ATTRIB2(index, (GLfloat) x, (GLfloat) y); + ATTRIB2NV(index, (GLfloat) x, (GLfloat) y); } static void GLAPIENTRY loopback_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) { - ATTRIB3(index, (GLfloat) x, (GLfloat) y, (GLfloat) z); -} - -static void GLAPIENTRY -loopback_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - ATTRIB3(index, x, y, z); + ATTRIB3NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z); } static void GLAPIENTRY loopback_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) { - ATTRIB4(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); + ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); } static void GLAPIENTRY loopback_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) { - ATTRIB4(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); + ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } static void GLAPIENTRY loopback_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) { - ATTRIB4(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); + ATTRIB4NV(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); } static void GLAPIENTRY loopback_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) { - ATTRIB4(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), + ATTRIB4NV(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w)); } static void GLAPIENTRY loopback_VertexAttrib1svNV(GLuint index, const GLshort *v) { - ATTRIB1(index, (GLfloat) v[0]); -} - -static void GLAPIENTRY -loopback_VertexAttrib1fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB1(index, v[0]); + ATTRIB1NV(index, (GLfloat) v[0]); } static void GLAPIENTRY loopback_VertexAttrib1dvNV(GLuint index, const GLdouble *v) { - ATTRIB1(index, (GLfloat) v[0]); + ATTRIB1NV(index, (GLfloat) v[0]); } static void GLAPIENTRY loopback_VertexAttrib2svNV(GLuint index, const GLshort *v) { - ATTRIB2(index, (GLfloat) v[0], (GLfloat) v[1]); -} - -static void GLAPIENTRY -loopback_VertexAttrib2fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB2(index, v[0], v[1]); + ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]); } static void GLAPIENTRY loopback_VertexAttrib2dvNV(GLuint index, const GLdouble *v) { - ATTRIB2(index, (GLfloat) v[0], (GLfloat) v[1]); + ATTRIB2NV(index, (GLfloat) v[0], (GLfloat) v[1]); } static void GLAPIENTRY loopback_VertexAttrib3svNV(GLuint index, const GLshort *v) { - ATTRIB3(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); -} - -static void GLAPIENTRY -loopback_VertexAttrib3fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB3(index, v[0], v[1], v[2]); + ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); } static void GLAPIENTRY loopback_VertexAttrib3dvNV(GLuint index, const GLdouble *v) { - ATTRIB3(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); + ATTRIB3NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); } static void GLAPIENTRY loopback_VertexAttrib4svNV(GLuint index, const GLshort *v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], + ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat)v[3]); } static void GLAPIENTRY -loopback_VertexAttrib4fvNV(GLuint index, const GLfloat *v) -{ - ATTRIB4(index, v[0], v[1], v[2], v[3]); -} - -static void GLAPIENTRY loopback_VertexAttrib4dvNV(GLuint index, const GLdouble *v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4NV(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4ubvNV(GLuint index, const GLubyte *v) { - ATTRIB4(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), + ATTRIB4NV(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3])); } @@ -1194,7 +1154,7 @@ loopback_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat *v) { GLint i; for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib1fvNV(index + i, v + i); + ATTRIB1NV(index + i, v[i]); } static void GLAPIENTRY @@ -1218,7 +1178,7 @@ loopback_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat *v) { GLint i; for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib2fvNV(index + i, v + 2 * i); + ATTRIB2NV(index + i, v[2 * i], v[2 * i + 1]); } static void GLAPIENTRY @@ -1242,7 +1202,7 @@ loopback_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat *v) { GLint i; for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib3fvNV(index + i, v + 3 * i); + ATTRIB3NV(index + i, v[3 * i], v[3 * i + 1], v[3 * i + 2]); } static void GLAPIENTRY @@ -1266,7 +1226,7 @@ loopback_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat *v) { GLint i; for (i = n - 1; i >= 0; i--) - loopback_VertexAttrib4fvNV(index + i, v + 4 * i); + ATTRIB4NV(index + i, v[4 * i], v[4 * i + 1], v[4 * i + 2], v[4 * i + 3]); } static void GLAPIENTRY @@ -1288,70 +1248,182 @@ loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v) /* * GL_ARB_vertex_program + * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions. */ static void GLAPIENTRY +loopback_VertexAttrib1sARB(GLuint index, GLshort x) +{ + ATTRIB1ARB(index, (GLfloat) x); +} + +static void GLAPIENTRY +loopback_VertexAttrib1dARB(GLuint index, GLdouble x) +{ + ATTRIB1ARB(index, (GLfloat) x); +} + +static void GLAPIENTRY +loopback_VertexAttrib2sARB(GLuint index, GLshort x, GLshort y) +{ + ATTRIB2ARB(index, (GLfloat) x, y); +} + +static void GLAPIENTRY +loopback_VertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) +{ + ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y); +} + +static void GLAPIENTRY +loopback_VertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) +{ + ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z); +} + +static void GLAPIENTRY +loopback_VertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) +{ + ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); +} + +static void GLAPIENTRY +loopback_VertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) +{ + ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); +} + +static void GLAPIENTRY +loopback_VertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) +{ + ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); +} + +static void GLAPIENTRY +loopback_VertexAttrib1svARB(GLuint index, const GLshort *v) +{ + ATTRIB1ARB(index, (GLfloat) v[0]); +} + +static void GLAPIENTRY +loopback_VertexAttrib1dvARB(GLuint index, const GLdouble *v) +{ + ATTRIB1ARB(index, (GLfloat) v[0]); +} + +static void GLAPIENTRY +loopback_VertexAttrib2svARB(GLuint index, const GLshort *v) +{ + ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]); +} + +static void GLAPIENTRY +loopback_VertexAttrib2dvARB(GLuint index, const GLdouble *v) +{ + ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]); +} + +static void GLAPIENTRY +loopback_VertexAttrib3svARB(GLuint index, const GLshort *v) +{ + ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); +} + +static void GLAPIENTRY +loopback_VertexAttrib3dvARB(GLuint index, const GLdouble *v) +{ + ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); +} + +static void GLAPIENTRY +loopback_VertexAttrib4svARB(GLuint index, const GLshort *v) +{ + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], + (GLfloat)v[3]); +} + +static void GLAPIENTRY +loopback_VertexAttrib4dvARB(GLuint index, const GLdouble *v) +{ + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); +} + +static void GLAPIENTRY loopback_VertexAttrib4bvARB(GLuint index, const GLbyte * v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4ivARB(GLuint index, const GLint * v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4ubvARB(GLuint index, const GLubyte * v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4usvARB(GLuint index, const GLushort * v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4uivARB(GLuint index, const GLuint * v) { - ATTRIB4(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); + ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } static void GLAPIENTRY loopback_VertexAttrib4NbvARB(GLuint index, const GLbyte * v) { - ATTRIB4(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), + ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3])); } static void GLAPIENTRY loopback_VertexAttrib4NsvARB(GLuint index, const GLshort * v) { - ATTRIB4(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), + ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3])); } static void GLAPIENTRY loopback_VertexAttrib4NivARB(GLuint index, const GLint * v) { - ATTRIB4(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), + ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3])); } static void GLAPIENTRY +loopback_VertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) +{ + ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), + UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w)); +} + +static void GLAPIENTRY +loopback_VertexAttrib4NubvARB(GLuint index, const GLubyte * v) +{ + ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), + UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3])); +} + +static void GLAPIENTRY loopback_VertexAttrib4NusvARB(GLuint index, const GLushort * v) { - ATTRIB4(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), + ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3])); } static void GLAPIENTRY loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v) { - ATTRIB4(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), + ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3])); } @@ -1511,32 +1583,23 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) dest->FogCoorddvEXT = loopback_FogCoorddvEXT; dest->VertexAttrib1sNV = loopback_VertexAttrib1sNV; - dest->VertexAttrib1fNV = loopback_VertexAttrib1fNV; dest->VertexAttrib1dNV = loopback_VertexAttrib1dNV; dest->VertexAttrib2sNV = loopback_VertexAttrib2sNV; - dest->VertexAttrib2fNV = loopback_VertexAttrib2fNV; dest->VertexAttrib2dNV = loopback_VertexAttrib2dNV; dest->VertexAttrib3sNV = loopback_VertexAttrib3sNV; - dest->VertexAttrib3fNV = loopback_VertexAttrib3fNV; dest->VertexAttrib3dNV = loopback_VertexAttrib3dNV; dest->VertexAttrib4sNV = loopback_VertexAttrib4sNV; dest->VertexAttrib4dNV = loopback_VertexAttrib4dNV; dest->VertexAttrib4ubNV = loopback_VertexAttrib4ubNV; - dest->VertexAttrib1svNV = loopback_VertexAttrib1svNV; - dest->VertexAttrib1fvNV = loopback_VertexAttrib1fvNV; dest->VertexAttrib1dvNV = loopback_VertexAttrib1dvNV; dest->VertexAttrib2svNV = loopback_VertexAttrib2svNV; - dest->VertexAttrib2fvNV = loopback_VertexAttrib2fvNV; dest->VertexAttrib2dvNV = loopback_VertexAttrib2dvNV; dest->VertexAttrib3svNV = loopback_VertexAttrib3svNV; - dest->VertexAttrib3fvNV = loopback_VertexAttrib3fvNV; dest->VertexAttrib3dvNV = loopback_VertexAttrib3dvNV; dest->VertexAttrib4svNV = loopback_VertexAttrib4svNV; - dest->VertexAttrib4fvNV = loopback_VertexAttrib4fvNV; dest->VertexAttrib4dvNV = loopback_VertexAttrib4dvNV; dest->VertexAttrib4ubvNV = loopback_VertexAttrib4ubvNV; - dest->VertexAttribs1svNV = loopback_VertexAttribs1svNV; dest->VertexAttribs1fvNV = loopback_VertexAttribs1fvNV; dest->VertexAttribs1dvNV = loopback_VertexAttribs1dvNV; @@ -1551,6 +1614,24 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) dest->VertexAttribs4dvNV = loopback_VertexAttribs4dvNV; dest->VertexAttribs4ubvNV = loopback_VertexAttribs4ubvNV; + dest->VertexAttrib1sARB = loopback_VertexAttrib1sARB; + dest->VertexAttrib1dARB = loopback_VertexAttrib1dARB; + dest->VertexAttrib2sARB = loopback_VertexAttrib2sARB; + dest->VertexAttrib2dARB = loopback_VertexAttrib2dARB; + dest->VertexAttrib3sARB = loopback_VertexAttrib3sARB; + dest->VertexAttrib3dARB = loopback_VertexAttrib3dARB; + dest->VertexAttrib4sARB = loopback_VertexAttrib4sARB; + dest->VertexAttrib4dARB = loopback_VertexAttrib4dARB; + dest->VertexAttrib1svARB = loopback_VertexAttrib1svARB; + dest->VertexAttrib1dvARB = loopback_VertexAttrib1dvARB; + dest->VertexAttrib2svARB = loopback_VertexAttrib2svARB; + dest->VertexAttrib2dvARB = loopback_VertexAttrib2dvARB; + dest->VertexAttrib3svARB = loopback_VertexAttrib3svARB; + dest->VertexAttrib3dvARB = loopback_VertexAttrib3dvARB; + dest->VertexAttrib4svARB = loopback_VertexAttrib4svARB; + dest->VertexAttrib4dvARB = loopback_VertexAttrib4dvARB; + dest->VertexAttrib4NubARB = loopback_VertexAttrib4NubARB; + dest->VertexAttrib4NubvARB = loopback_VertexAttrib4NubvARB; dest->VertexAttrib4bvARB = loopback_VertexAttrib4bvARB; dest->VertexAttrib4ivARB = loopback_VertexAttrib4ivARB; dest->VertexAttrib4ubvARB = loopback_VertexAttrib4ubvARB; diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index d09a4496573..661a72008a3 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -394,7 +394,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib1fNV( GLuint index, GLfloat x ) ASSIGN_4V(ctx->Current.Attrib[index], x, 0, 0, 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1f" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v ) @@ -404,7 +404,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v ) ASSIGN_4V(ctx->Current.Attrib[index], v[0], 0, 0, 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fvNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ) @@ -414,7 +414,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2f" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) @@ -424,7 +424,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], 0, 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fvNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x, @@ -435,7 +435,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x, ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3f" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) @@ -445,7 +445,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], 1); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fvNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, @@ -456,7 +456,7 @@ void GLAPIENTRY _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4f" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fNV" ); } void GLAPIENTRY _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) @@ -466,9 +466,98 @@ void GLAPIENTRY _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]); } else - _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fv" ); + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fvNV" ); } + +/* + * XXX Un-alias attribs here + */ + +void GLAPIENTRY _mesa_noop_VertexAttrib1fARB( GLuint index, GLfloat x ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], x, 0, 0, 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib1fvARB( GLuint index, const GLfloat *v ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], v[0], 0, 0, 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib1fvARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], x, y, 0, 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib2fvARB( GLuint index, const GLfloat *v ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], 0, 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib2fvARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib3fARB( GLuint index, GLfloat x, + GLfloat y, GLfloat z ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib3fvARB( GLuint index, const GLfloat *v ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], 1); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib3fvARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib4fARB( GLuint index, GLfloat x, + GLfloat y, GLfloat z, GLfloat w ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fARB" ); +} + +void GLAPIENTRY _mesa_noop_VertexAttrib4fvARB( GLuint index, const GLfloat *v ) +{ + GET_CURRENT_CONTEXT(ctx); + if (index < VERT_ATTRIB_MAX) { + ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]); + } + else + _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttrib4fvARB" ); +} + + + /* Material */ void GLAPIENTRY _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) @@ -855,6 +944,14 @@ void _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->VertexAttrib3fvNV = _mesa_noop_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = _mesa_noop_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = _mesa_noop_VertexAttrib4fvNV; + vfmt->VertexAttrib1fARB = _mesa_noop_VertexAttrib1fARB; + vfmt->VertexAttrib1fvARB = _mesa_noop_VertexAttrib1fvARB; + vfmt->VertexAttrib2fARB = _mesa_noop_VertexAttrib2fARB; + vfmt->VertexAttrib2fvARB = _mesa_noop_VertexAttrib2fvARB; + vfmt->VertexAttrib3fARB = _mesa_noop_VertexAttrib3fARB; + vfmt->VertexAttrib3fvARB = _mesa_noop_VertexAttrib3fvARB; + vfmt->VertexAttrib4fARB = _mesa_noop_VertexAttrib4fARB; + vfmt->VertexAttrib4fvARB = _mesa_noop_VertexAttrib4fvARB; vfmt->Rectf = _mesa_noop_Rectf; diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h index 7bb9c88dd1a..56d930e3b04 100644 --- a/src/mesa/main/api_noop.h +++ b/src/mesa/main/api_noop.h @@ -39,109 +39,76 @@ * */ extern void GLAPIENTRY _mesa_noop_EdgeFlag( GLboolean b ); - extern void GLAPIENTRY _mesa_noop_EdgeFlagv( const GLboolean *b ); extern void GLAPIENTRY _mesa_noop_FogCoordfEXT( GLfloat a ); - extern void GLAPIENTRY _mesa_noop_FogCoordfvEXT( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_Indexf( GLfloat i ); - extern void GLAPIENTRY _mesa_noop_Indexfv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c ); - extern void GLAPIENTRY _mesa_noop_Normal3fv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *param ); extern void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d ); - extern void _mesa_noop_Color4ubv( const GLubyte *v ); - extern void GLAPIENTRY _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); - extern void GLAPIENTRY _mesa_noop_Color4fv( const GLfloat *v ); - extern void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c ); - extern void _mesa_noop_Color3ubv( const GLubyte *v ); - extern void GLAPIENTRY _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c ); - extern void GLAPIENTRY _mesa_noop_Color3fv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a ); - extern void GLAPIENTRY _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, - GLfloat b ); - +extern void GLAPIENTRY _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b ); extern void GLAPIENTRY _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, - GLfloat b, GLfloat c); - +extern void GLAPIENTRY _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c); extern void GLAPIENTRY _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, - GLfloat b, GLfloat c, GLfloat d ); - +extern void GLAPIENTRY _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c, GLfloat d ); extern void GLAPIENTRY _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v ); -extern void _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c ); - -extern void _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v ); - +extern void GLAPIENTRY _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c ); +extern void GLAPIENTRY _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v ); extern void GLAPIENTRY _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c ); - extern void GLAPIENTRY _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_TexCoord1f( GLfloat a ); - extern void GLAPIENTRY _mesa_noop_TexCoord1fv( const GLfloat *v ); - extern void GLAPIENTRY _mesa_noop_TexCoord2f( GLfloat a, GLfloat b ); - extern void GLAPIENTRY _mesa_noop_TexCoord2fv( const GLfloat *v ); - extern void GLAPIENTRY _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c ); - extern void GLAPIENTRY _mesa_noop_TexCoord3fv( const GLfloat *v ); - extern void GLAPIENTRY _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); - extern void GLAPIENTRY _mesa_noop_TexCoord4fv( const GLfloat *v ); -extern void GLAPIENTRY _mesa_noop_Vertex2fv( const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_Vertex3fv( const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_Vertex4fv( const GLfloat *v ); - extern void GLAPIENTRY _mesa_noop_Vertex2f( GLfloat a, GLfloat b ); - +extern void GLAPIENTRY _mesa_noop_Vertex2fv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c ); - +extern void GLAPIENTRY _mesa_noop_Vertex3fv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ); +extern void GLAPIENTRY _mesa_noop_Vertex4fv( const GLfloat *v ); extern void GLAPIENTRY _mesa_noop_VertexAttrib1fNV( GLuint index, GLfloat x ); - extern void GLAPIENTRY _mesa_noop_VertexAttrib1fvNV( GLuint index, const GLfloat *v ); - extern void GLAPIENTRY _mesa_noop_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ); extern void GLAPIENTRY _mesa_noop_VertexAttrib2fvNV( GLuint index, const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x, - GLfloat y, GLfloat z ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z ); extern void GLAPIENTRY _mesa_noop_VertexAttrib3fvNV( GLuint index, const GLfloat *v ); - -extern void GLAPIENTRY _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, - GLfloat y, GLfloat z, GLfloat w ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); extern void GLAPIENTRY _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib1fARB( GLuint index, GLfloat x ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib1fvARB( GLuint index, const GLfloat *v ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib2fvARB( GLuint index, const GLfloat *v ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib3fvARB( GLuint index, const GLfloat *v ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +extern void GLAPIENTRY _mesa_noop_VertexAttrib4fvARB( GLuint index, const GLfloat *v ); + extern void GLAPIENTRY _mesa_noop_End( void ); extern void GLAPIENTRY _mesa_noop_Begin( GLenum mode ); diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 68e6273a679..23ec4587aaf 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -5,7 +5,7 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -956,6 +956,14 @@ typedef struct { void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); + void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); + void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); + void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); + void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); + void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); + void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); /*@}*/ /* diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 9da97d8c75c..348ba495889 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -320,10 +320,14 @@ typedef enum { /* Vertex attributes -- fallback for when optimized display * list build isn't active. */ - OPCODE_ATTR_1F, - OPCODE_ATTR_2F, - OPCODE_ATTR_3F, - OPCODE_ATTR_4F, + OPCODE_ATTR_1F_NV, + OPCODE_ATTR_2F_NV, + OPCODE_ATTR_3F_NV, + OPCODE_ATTR_4F_NV, + OPCODE_ATTR_1F_ARB, + OPCODE_ATTR_2F_ARB, + OPCODE_ATTR_3F_ARB, + OPCODE_ATTR_4F_ARB, OPCODE_MATERIAL, OPCODE_INDEX, OPCODE_EDGEFLAG, @@ -785,10 +789,14 @@ _mesa_init_lists( void ) InstSize[OPCODE_END_QUERY_ARB] = 2; #endif InstSize[OPCODE_DRAW_BUFFERS_ARB] = 2 + MAX_DRAW_BUFFERS; - InstSize[OPCODE_ATTR_1F] = 3; - InstSize[OPCODE_ATTR_2F] = 4; - InstSize[OPCODE_ATTR_3F] = 5; - InstSize[OPCODE_ATTR_4F] = 6; + InstSize[OPCODE_ATTR_1F_NV] = 3; + InstSize[OPCODE_ATTR_2F_NV] = 4; + InstSize[OPCODE_ATTR_3F_NV] = 5; + InstSize[OPCODE_ATTR_4F_NV] = 6; + InstSize[OPCODE_ATTR_1F_ARB] = 3; + InstSize[OPCODE_ATTR_2F_ARB] = 4; + InstSize[OPCODE_ATTR_3F_ARB] = 5; + InstSize[OPCODE_ATTR_4F_ARB] = 6; InstSize[OPCODE_MATERIAL] = 7; InstSize[OPCODE_INDEX] = 2; InstSize[OPCODE_EDGEFLAG] = 2; @@ -4708,12 +4716,12 @@ save_DrawBuffersARB(GLsizei count, const GLenum *buffers) } -static void save_Attr1f( GLenum attr, GLfloat x ) +static void save_Attr1fNV( GLenum attr, GLfloat x ) { GET_CURRENT_CONTEXT(ctx); Node *n; SAVE_FLUSH_VERTICES( ctx ); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_1F, 2 ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_1F_NV, 2 ); if (n) { n[1].e = attr; n[2].f = x; @@ -4728,12 +4736,12 @@ static void save_Attr1f( GLenum attr, GLfloat x ) } } -static void save_Attr2f( GLenum attr, GLfloat x, GLfloat y ) +static void save_Attr2fNV( GLenum attr, GLfloat x, GLfloat y ) { GET_CURRENT_CONTEXT(ctx); Node *n; SAVE_FLUSH_VERTICES( ctx ); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_2F, 3 ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_2F_NV, 3 ); if (n) { n[1].e = attr; n[2].f = x; @@ -4749,12 +4757,12 @@ static void save_Attr2f( GLenum attr, GLfloat x, GLfloat y ) } } -static void save_Attr3f( GLenum attr, GLfloat x, GLfloat y, GLfloat z ) +static void save_Attr3fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z ) { GET_CURRENT_CONTEXT(ctx); Node *n; SAVE_FLUSH_VERTICES( ctx ); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_3F, 4 ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_3F_NV, 4 ); if (n) { n[1].e = attr; n[2].f = x; @@ -4771,13 +4779,13 @@ static void save_Attr3f( GLenum attr, GLfloat x, GLfloat y, GLfloat z ) } } -static void save_Attr4f( GLenum attr, GLfloat x, GLfloat y, GLfloat z, - GLfloat w ) +static void save_Attr4fNV( GLenum attr, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ) { GET_CURRENT_CONTEXT(ctx); Node *n; SAVE_FLUSH_VERTICES( ctx ); - n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_4F, 5 ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_4F_NV, 5 ); if (n) { n[1].e = attr; n[2].f = x; @@ -4795,6 +4803,95 @@ static void save_Attr4f( GLenum attr, GLfloat x, GLfloat y, GLfloat z, } } + +static void save_Attr1fARB( GLenum attr, GLfloat x ) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + SAVE_FLUSH_VERTICES( ctx ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_1F_ARB, 2 ); + if (n) { + n[1].e = attr; + n[2].f = x; + } + + ASSERT(attr < VERT_ATTRIB_MAX); + ctx->ListState.ActiveAttribSize[attr] = 1; + ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1); + + if (ctx->ExecuteFlag) { + (*ctx->Exec->VertexAttrib1fARB)( attr, x ); + } +} + +static void save_Attr2fARB( GLenum attr, GLfloat x, GLfloat y ) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + SAVE_FLUSH_VERTICES( ctx ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_2F_ARB, 3 ); + if (n) { + n[1].e = attr; + n[2].f = x; + n[3].f = y; + } + + ASSERT(attr < VERT_ATTRIB_MAX); + ctx->ListState.ActiveAttribSize[attr] = 2; + ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, 0, 1); + + if (ctx->ExecuteFlag) { + (*ctx->Exec->VertexAttrib2fARB)( attr, x, y ); + } +} + +static void save_Attr3fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z ) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + SAVE_FLUSH_VERTICES( ctx ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_3F_ARB, 4 ); + if (n) { + n[1].e = attr; + n[2].f = x; + n[3].f = y; + n[4].f = z; + } + + ASSERT(attr < VERT_ATTRIB_MAX); + ctx->ListState.ActiveAttribSize[attr] = 3; + ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, 1); + + if (ctx->ExecuteFlag) { + (*ctx->Exec->VertexAttrib3fARB)( attr, x, y, z ); + } +} + +static void save_Attr4fARB( GLenum attr, GLfloat x, GLfloat y, GLfloat z, + GLfloat w ) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + SAVE_FLUSH_VERTICES( ctx ); + n = ALLOC_INSTRUCTION( ctx, OPCODE_ATTR_4F_ARB, 5 ); + if (n) { + n[1].e = attr; + n[2].f = x; + n[3].f = y; + n[4].f = z; + n[5].f = w; + } + + ASSERT(attr < VERT_ATTRIB_MAX); + ctx->ListState.ActiveAttribSize[attr] = 4; + ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, w); + + if (ctx->ExecuteFlag) { + (*ctx->Exec->VertexAttrib4fARB)( attr, x, y, z, w ); + } +} + + static void GLAPIENTRY save_EvalCoord1f( GLfloat x ) { GET_CURRENT_CONTEXT(ctx); @@ -5024,8 +5121,7 @@ static void GLAPIENTRY save_End( void ) } } -static void GLAPIENTRY save_Rectf( GLfloat a, GLfloat b, - GLfloat c, GLfloat d ) +static void GLAPIENTRY save_Rectf( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) { GET_CURRENT_CONTEXT(ctx); Node *n; @@ -5042,126 +5138,125 @@ static void GLAPIENTRY save_Rectf( GLfloat a, GLfloat b, } } -/* - */ + static void GLAPIENTRY save_Vertex2f( GLfloat x, GLfloat y ) { - save_Attr2f( VERT_ATTRIB_POS, x, y ); + save_Attr2fNV( VERT_ATTRIB_POS, x, y ); } static void GLAPIENTRY save_Vertex2fv( const GLfloat *v ) { - save_Attr2f( VERT_ATTRIB_POS, v[0], v[1] ); + save_Attr2fNV( VERT_ATTRIB_POS, v[0], v[1] ); } static void GLAPIENTRY save_Vertex3f( GLfloat x, GLfloat y, GLfloat z ) { - save_Attr3f( VERT_ATTRIB_POS, x, y, z ); + save_Attr3fNV( VERT_ATTRIB_POS, x, y, z ); } static void GLAPIENTRY save_Vertex3fv( const GLfloat *v ) { - save_Attr3f( VERT_ATTRIB_POS, v[0], v[1], v[2] ); + save_Attr3fNV( VERT_ATTRIB_POS, v[0], v[1], v[2] ); } static void GLAPIENTRY save_Vertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - save_Attr4f( VERT_ATTRIB_POS, x, y, z, w ); + save_Attr4fNV( VERT_ATTRIB_POS, x, y, z, w ); } static void GLAPIENTRY save_Vertex4fv( const GLfloat *v ) { - save_Attr4f( VERT_ATTRIB_POS, v[0], v[1], v[2], v[3] ); + save_Attr4fNV( VERT_ATTRIB_POS, v[0], v[1], v[2], v[3] ); } static void GLAPIENTRY save_TexCoord1f( GLfloat x ) { - save_Attr1f( VERT_ATTRIB_TEX0, x ); + save_Attr1fNV( VERT_ATTRIB_TEX0, x ); } static void GLAPIENTRY save_TexCoord1fv( const GLfloat *v ) { - save_Attr1f( VERT_ATTRIB_TEX0, v[0] ); + save_Attr1fNV( VERT_ATTRIB_TEX0, v[0] ); } static void GLAPIENTRY save_TexCoord2f( GLfloat x, GLfloat y ) { - save_Attr2f( VERT_ATTRIB_TEX0, x, y ); + save_Attr2fNV( VERT_ATTRIB_TEX0, x, y ); } static void GLAPIENTRY save_TexCoord2fv( const GLfloat *v ) { - save_Attr2f( VERT_ATTRIB_TEX0, v[0], v[1] ); + save_Attr2fNV( VERT_ATTRIB_TEX0, v[0], v[1] ); } static void GLAPIENTRY save_TexCoord3f( GLfloat x, GLfloat y, GLfloat z ) { - save_Attr3f( VERT_ATTRIB_TEX0, x, y, z ); + save_Attr3fNV( VERT_ATTRIB_TEX0, x, y, z ); } static void GLAPIENTRY save_TexCoord3fv( const GLfloat *v ) { - save_Attr3f( VERT_ATTRIB_TEX0, v[0], v[1], v[2] ); + save_Attr3fNV( VERT_ATTRIB_TEX0, v[0], v[1], v[2] ); } static void GLAPIENTRY save_TexCoord4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - save_Attr4f( VERT_ATTRIB_TEX0, x, y, z, w ); + save_Attr4fNV( VERT_ATTRIB_TEX0, x, y, z, w ); } static void GLAPIENTRY save_TexCoord4fv( const GLfloat *v ) { - save_Attr4f( VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3] ); + save_Attr4fNV( VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3] ); } static void GLAPIENTRY save_Normal3f( GLfloat x, GLfloat y, GLfloat z ) { - save_Attr3f( VERT_ATTRIB_NORMAL, x, y, z ); + save_Attr3fNV( VERT_ATTRIB_NORMAL, x, y, z ); } static void GLAPIENTRY save_Normal3fv( const GLfloat *v ) { - save_Attr3f( VERT_ATTRIB_NORMAL, v[0], v[1], v[2] ); + save_Attr3fNV( VERT_ATTRIB_NORMAL, v[0], v[1], v[2] ); } static void GLAPIENTRY save_FogCoordfEXT( GLfloat x ) { - save_Attr1f( VERT_ATTRIB_FOG, x ); + save_Attr1fNV( VERT_ATTRIB_FOG, x ); } static void GLAPIENTRY save_FogCoordfvEXT( const GLfloat *v ) { - save_Attr1f( VERT_ATTRIB_FOG, v[0] ); + save_Attr1fNV( VERT_ATTRIB_FOG, v[0] ); } static void GLAPIENTRY save_Color3f( GLfloat x, GLfloat y, GLfloat z ) { - save_Attr3f( VERT_ATTRIB_COLOR0, x, y, z ); + save_Attr3fNV( VERT_ATTRIB_COLOR0, x, y, z ); } static void GLAPIENTRY save_Color3fv( const GLfloat *v ) { - save_Attr3f( VERT_ATTRIB_COLOR0, v[0], v[1], v[2] ); + save_Attr3fNV( VERT_ATTRIB_COLOR0, v[0], v[1], v[2] ); } static void GLAPIENTRY save_Color4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - save_Attr4f( VERT_ATTRIB_COLOR0, x, y, z, w ); + save_Attr4fNV( VERT_ATTRIB_COLOR0, x, y, z, w ); } static void GLAPIENTRY save_Color4fv( const GLfloat *v ) { - save_Attr4f( VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3] ); + save_Attr4fNV( VERT_ATTRIB_COLOR0, v[0], v[1], v[2], v[3] ); } static void GLAPIENTRY save_SecondaryColor3fEXT( GLfloat x, GLfloat y, GLfloat z ) { - save_Attr3f( VERT_ATTRIB_COLOR1, x, y, z ); + save_Attr3fNV( VERT_ATTRIB_COLOR1, x, y, z ); } static void GLAPIENTRY save_SecondaryColor3fvEXT( const GLfloat *v ) { - save_Attr3f( VERT_ATTRIB_COLOR1, v[0], v[1], v[2] ); + save_Attr3fNV( VERT_ATTRIB_COLOR1, v[0], v[1], v[2] ); } @@ -5170,51 +5265,51 @@ static void GLAPIENTRY save_SecondaryColor3fvEXT( const GLfloat *v ) static void GLAPIENTRY save_MultiTexCoord1f( GLenum target, GLfloat x ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr1f( attr, x ); + save_Attr1fNV( attr, x ); } static void GLAPIENTRY save_MultiTexCoord1fv( GLenum target, const GLfloat *v ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr1f( attr, v[0] ); + save_Attr1fNV( attr, v[0] ); } static void GLAPIENTRY save_MultiTexCoord2f( GLenum target, GLfloat x, GLfloat y ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr2f( attr, x, y ); + save_Attr2fNV( attr, x, y ); } static void GLAPIENTRY save_MultiTexCoord2fv( GLenum target, const GLfloat *v ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr2f( attr, v[0], v[1] ); + save_Attr2fNV( attr, v[0], v[1] ); } static void GLAPIENTRY save_MultiTexCoord3f( GLenum target, GLfloat x, GLfloat y, GLfloat z) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr3f( attr, x, y, z ); + save_Attr3fNV( attr, x, y, z ); } static void GLAPIENTRY save_MultiTexCoord3fv( GLenum target, const GLfloat *v ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr3f( attr, v[0], v[1], v[2] ); + save_Attr3fNV( attr, v[0], v[1], v[2] ); } static void GLAPIENTRY save_MultiTexCoord4f( GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr4f( attr, x, y, z, w ); + save_Attr4fNV( attr, x, y, z, w ); } static void GLAPIENTRY save_MultiTexCoord4fv( GLenum target, const GLfloat *v ) { GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr4f( attr, v[0], v[1], v[2], v[3] ); + save_Attr4fNV( attr, v[0], v[1], v[2], v[3] ); } @@ -5231,7 +5326,7 @@ static void enum_error( void ) static void GLAPIENTRY save_VertexAttrib1fNV( GLuint index, GLfloat x ) { if (index < VERT_ATTRIB_MAX) - save_Attr1f( index, x ); + save_Attr1fNV( index, x ); else enum_error(); } @@ -5239,7 +5334,7 @@ static void GLAPIENTRY save_VertexAttrib1fNV( GLuint index, GLfloat x ) static void GLAPIENTRY save_VertexAttrib1fvNV( GLuint index, const GLfloat *v ) { if (index < VERT_ATTRIB_MAX) - save_Attr1f( index, v[0] ); + save_Attr1fNV( index, v[0] ); else enum_error(); } @@ -5247,7 +5342,7 @@ static void GLAPIENTRY save_VertexAttrib1fvNV( GLuint index, const GLfloat *v ) static void GLAPIENTRY save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y ) { if (index < VERT_ATTRIB_MAX) - save_Attr2f( index, x, y ); + save_Attr2fNV( index, x, y ); else enum_error(); } @@ -5255,7 +5350,7 @@ static void GLAPIENTRY save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y static void GLAPIENTRY save_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) { if (index < VERT_ATTRIB_MAX) - save_Attr2f( index, v[0], v[1] ); + save_Attr2fNV( index, v[0], v[1] ); else enum_error(); } @@ -5264,7 +5359,7 @@ static void GLAPIENTRY save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y GLfloat z ) { if (index < VERT_ATTRIB_MAX) - save_Attr3f( index, x, y, z ); + save_Attr3fNV( index, x, y, z ); else enum_error(); } @@ -5272,7 +5367,7 @@ static void GLAPIENTRY save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y static void GLAPIENTRY save_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) { if (index < VERT_ATTRIB_MAX) - save_Attr3f( index, v[0], v[1], v[2] ); + save_Attr3fNV( index, v[0], v[1], v[2] ); else enum_error(); } @@ -5281,7 +5376,7 @@ static void GLAPIENTRY save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y GLfloat z, GLfloat w ) { if (index < VERT_ATTRIB_MAX) - save_Attr4f( index, x, y, z, w ); + save_Attr4fNV( index, x, y, z, w ); else enum_error(); } @@ -5289,7 +5384,82 @@ static void GLAPIENTRY save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y static void GLAPIENTRY save_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) { if (index < VERT_ATTRIB_MAX) - save_Attr4f( index, v[0], v[1], v[2], v[3] ); + save_Attr4fNV( index, v[0], v[1], v[2], v[3] ); + else + enum_error(); +} + + + + +static void GLAPIENTRY +save_VertexAttrib1fARB( GLuint index, GLfloat x ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr1fARB( index, x ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib1fvARB( GLuint index, const GLfloat *v ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr1fARB( index, v[0] ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr2fARB( index, x, y ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib2fvARB( GLuint index, const GLfloat *v ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr2fARB( index, v[0], v[1] ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr3fARB( index, x, y, z ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib3fvARB( GLuint index, const GLfloat *v ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr3fARB( index, v[0], v[1], v[2] ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr4fARB( index, x, y, z, w ); + else + enum_error(); +} + +static void GLAPIENTRY +save_VertexAttrib4fvARB( GLuint index, const GLfloat *v ) +{ + if (index < VERT_ATTRIB_MAX) + save_Attr4fARB( index, v[0], v[1], v[2], v[3] ); else enum_error(); } @@ -6076,10 +6246,10 @@ execute_list( GLcontext *ctx, GLuint list ) ctx->Exec->DrawBuffersARB(n[1].i, buffers); } break; - case OPCODE_ATTR_1F: + case OPCODE_ATTR_1F_NV: (*ctx->Exec->VertexAttrib1fNV)(n[1].e, n[2].f); break; - case OPCODE_ATTR_2F: + case OPCODE_ATTR_2F_NV: /* Really shouldn't have to do this - the Node structure * is convenient, but it would be better to store the data * packed appropriately so that it can be sent directly @@ -6091,20 +6261,49 @@ execute_list( GLcontext *ctx, GLuint list ) else (*ctx->Exec->VertexAttrib2fNV)(n[1].e, n[2].f, n[3].f); break; - case OPCODE_ATTR_3F: + case OPCODE_ATTR_3F_NV: if (sizeof(Node)==sizeof(GLfloat)) (*ctx->Exec->VertexAttrib3fvNV)(n[1].e, &n[2].f); else (*ctx->Exec->VertexAttrib3fNV)(n[1].e, n[2].f, n[3].f, n[4].f); break; - case OPCODE_ATTR_4F: + case OPCODE_ATTR_4F_NV: if (sizeof(Node)==sizeof(GLfloat)) (*ctx->Exec->VertexAttrib4fvNV)(n[1].e, &n[2].f); else (*ctx->Exec->VertexAttrib4fNV)(n[1].e, n[2].f, n[3].f, n[4].f, n[5].f); break; + case OPCODE_ATTR_1F_ARB: + (*ctx->Exec->VertexAttrib1fARB)(n[1].e, n[2].f); + break; + case OPCODE_ATTR_2F_ARB: + /* Really shouldn't have to do this - the Node structure + * is convenient, but it would be better to store the data + * packed appropriately so that it can be sent directly + * on. With x86_64 becoming common, this will start to + * matter more. + */ + if (sizeof(Node)==sizeof(GLfloat)) + (*ctx->Exec->VertexAttrib2fvARB)(n[1].e, &n[2].f); + else + (*ctx->Exec->VertexAttrib2fARB)(n[1].e, n[2].f, n[3].f); + break; + case OPCODE_ATTR_3F_ARB: + if (sizeof(Node)==sizeof(GLfloat)) + (*ctx->Exec->VertexAttrib3fvARB)(n[1].e, &n[2].f); + else + (*ctx->Exec->VertexAttrib3fARB)(n[1].e, n[2].f, n[3].f, + n[4].f); + break; + case OPCODE_ATTR_4F_ARB: + if (sizeof(Node)==sizeof(GLfloat)) + (*ctx->Exec->VertexAttrib4fvARB)(n[1].e, &n[2].f); + else + (*ctx->Exec->VertexAttrib4fARB)(n[1].e, n[2].f, n[3].f, + n[4].f, n[5].f); + break; case OPCODE_MATERIAL: if (sizeof(Node)==sizeof(GLfloat)) (*ctx->Exec->Materialfv)(n[1].e, n[2].e, &n[3].f); @@ -7847,24 +8046,39 @@ static void GLAPIENTRY print_list( GLcontext *ctx, GLuint list ) n[1].i, n[2].i, n[3].i, n[4].i); break; - - - case OPCODE_ATTR_1F: - _mesa_printf("ATTR_1F attr %d: %f\n", + case OPCODE_ATTR_1F_NV: + _mesa_printf("ATTR_1F_NV attr %d: %f\n", + n[1].i, n[2].f); + break; + case OPCODE_ATTR_2F_NV: + _mesa_printf("ATTR_2F_NV attr %d: %f %f\n", + n[1].i, n[2].f, n[3].f); + break; + case OPCODE_ATTR_3F_NV: + _mesa_printf("ATTR_3F_NV attr %d: %f %f %f\n", + n[1].i, n[2].f, n[3].f, n[4].f); + break; + case OPCODE_ATTR_4F_NV: + _mesa_printf("ATTR_4F_NV attr %d: %f %f %f %f\n", + n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); + break; + case OPCODE_ATTR_1F_ARB: + _mesa_printf("ATTR_1F_ARB attr %d: %f\n", n[1].i, n[2].f); break; - case OPCODE_ATTR_2F: - _mesa_printf("ATTR_2F attr %d: %f %f\n", + case OPCODE_ATTR_2F_ARB: + _mesa_printf("ATTR_2F_ARB attr %d: %f %f\n", n[1].i, n[2].f, n[3].f); break; - case OPCODE_ATTR_3F: - _mesa_printf("ATTR_3F attr %d: %f %f %f\n", + case OPCODE_ATTR_3F_ARB: + _mesa_printf("ATTR_3F_ARB attr %d: %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f); break; - case OPCODE_ATTR_4F: - _mesa_printf("ATTR_4F attr %d: %f %f %f %f\n", + case OPCODE_ATTR_4F_ARB: + _mesa_printf("ATTR_4F_ARB attr %d: %f %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); break; + case OPCODE_MATERIAL: _mesa_printf("MATERIAL %x %x: %f %f %f %f\n", n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f); @@ -8009,6 +8223,14 @@ void _mesa_save_vtxfmt_init( GLvertexformat *vfmt ) vfmt->VertexAttrib3fvNV = save_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = save_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = save_VertexAttrib4fvNV; + vfmt->VertexAttrib1fARB = save_VertexAttrib1fARB; + vfmt->VertexAttrib1fvARB = save_VertexAttrib1fvARB; + vfmt->VertexAttrib2fARB = save_VertexAttrib2fARB; + vfmt->VertexAttrib2fvARB = save_VertexAttrib2fvARB; + vfmt->VertexAttrib3fARB = save_VertexAttrib3fARB; + vfmt->VertexAttrib3fvARB = save_VertexAttrib3fvARB; + vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB; + vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB; vfmt->EvalMesh1 = _mesa_save_EvalMesh1; vfmt->EvalMesh2 = _mesa_save_EvalMesh2; diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index babc1868e77..76724c0e853 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -649,9 +649,9 @@ _mesa_init_exec_table(struct _glapi_table *exec) /* glDeleteProgramsARB aliases glDeleteProgramsNV */ /* glGenProgramsARB aliases glGenProgramsNV */ /* glIsProgramARB aliases glIsProgramNV */ - /* glGetVertexAttribdvARB aliases glGetVertexAttribdvNV */ - /* glGetVertexAttribfvARB aliases glGetVertexAttribfvNV */ - /* glGetVertexAttribivARB aliases glGetVertexAttribivNV */ + exec->GetVertexAttribdvARB = _mesa_GetVertexAttribdvARB; + exec->GetVertexAttribfvARB = _mesa_GetVertexAttribfvARB; + exec->GetVertexAttribivARB = _mesa_GetVertexAttribivARB; /* glGetVertexAttribPointervARB aliases glGetVertexAttribPointervNV */ exec->ProgramEnvParameter4dARB = _mesa_ProgramEnvParameter4dARB; exec->ProgramEnvParameter4dvARB = _mesa_ProgramEnvParameter4dvARB; diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index e45e5ca22e2..3aaf7daa58b 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * @@ -131,6 +131,14 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) tab->VertexAttrib3fvNV = vfmt->VertexAttrib3fvNV; tab->VertexAttrib4fNV = vfmt->VertexAttrib4fNV; tab->VertexAttrib4fvNV = vfmt->VertexAttrib4fvNV; + tab->VertexAttrib1fARB = vfmt->VertexAttrib1fARB; + tab->VertexAttrib1fvARB = vfmt->VertexAttrib1fvARB; + tab->VertexAttrib2fARB = vfmt->VertexAttrib2fARB; + tab->VertexAttrib2fvARB = vfmt->VertexAttrib2fvARB; + tab->VertexAttrib3fARB = vfmt->VertexAttrib3fARB; + tab->VertexAttrib3fvARB = vfmt->VertexAttrib3fvARB; + tab->VertexAttrib4fARB = vfmt->VertexAttrib4fARB; + tab->VertexAttrib4fvARB = vfmt->VertexAttrib4fvARB; tab->Rectf = vfmt->Rectf; tab->DrawArrays = vfmt->DrawArrays; tab->DrawElements = vfmt->DrawElements; diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index 22a4b3587ab..8b0bd79184d 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -1,9 +1,8 @@ - /* * Mesa 3-D graphics library - * Version: 4.1 + * Version: 6.3 * - * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -409,6 +408,55 @@ static void GLAPIENTRY TAG(VertexAttrib4fvNV)( GLuint index, const GLfloat *v ) } +static void GLAPIENTRY TAG(VertexAttrib1fARB)( GLuint index, GLfloat x ) +{ + PRE_LOOPBACK( VertexAttrib1fARB ); + GL_CALL(VertexAttrib1fARB)( index, x ); +} + +static void GLAPIENTRY TAG(VertexAttrib1fvARB)( GLuint index, const GLfloat *v ) +{ + PRE_LOOPBACK( VertexAttrib1fvARB ); + GL_CALL(VertexAttrib1fvARB)( index, v ); +} + +static void GLAPIENTRY TAG(VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ) +{ + PRE_LOOPBACK( VertexAttrib2fARB ); + GL_CALL(VertexAttrib2fARB)( index, x, y ); +} + +static void GLAPIENTRY TAG(VertexAttrib2fvARB)( GLuint index, const GLfloat *v ) +{ + PRE_LOOPBACK( VertexAttrib2fvARB ); + GL_CALL(VertexAttrib2fvARB)( index, v ); +} + +static void GLAPIENTRY TAG(VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ) +{ + PRE_LOOPBACK( VertexAttrib3fARB ); + GL_CALL(VertexAttrib3fARB)( index, x, y, z ); +} + +static void GLAPIENTRY TAG(VertexAttrib3fvARB)( GLuint index, const GLfloat *v ) +{ + PRE_LOOPBACK( VertexAttrib3fvARB ); + GL_CALL(VertexAttrib3fvARB)( index, v ); +} + +static void GLAPIENTRY TAG(VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +{ + PRE_LOOPBACK( VertexAttrib4fARB ); + GL_CALL(VertexAttrib4fARB)( index, x, y, z, w ); +} + +static void GLAPIENTRY TAG(VertexAttrib4fvARB)( GLuint index, const GLfloat *v ) +{ + PRE_LOOPBACK( VertexAttrib4fvARB ); + GL_CALL(VertexAttrib4fvARB)( index, v ); +} + + static GLvertexformat TAG(vtxfmt) = { TAG(ArrayElement), TAG(Color3f), @@ -466,6 +514,14 @@ static GLvertexformat TAG(vtxfmt) = { TAG(VertexAttrib3fvNV), TAG(VertexAttrib4fNV), TAG(VertexAttrib4fvNV), + TAG(VertexAttrib1fARB), + TAG(VertexAttrib1fvARB), + TAG(VertexAttrib2fARB), + TAG(VertexAttrib2fvARB), + TAG(VertexAttrib3fARB), + TAG(VertexAttrib3fvARB), + TAG(VertexAttrib4fARB), + TAG(VertexAttrib4fvARB), TAG(Rectf), TAG(DrawArrays), TAG(DrawElements), |