From bb38cadb1c5f2dc13096a091bdaf61dc3e3cfa4d Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Tue, 11 Apr 2006 11:41:11 +0000 Subject: More GLSL code: - use macros to access and modify render inputs bit-field; - un-alias generic vertex attributes for ARB vertex calls; - use MAX_VERTEX_PROGRAM_ATTRIBS (NV code) or MAX_VERTEX_ATTRIBS (ARB code) in place of VERT_ATTRIB_MAX; - define VERT_ATTRIB_GENERIC0..15 for un-aliased vertex attributes for ARB_vertex_shader; - fix generic attribute index range check in arbprogparse.c; - interface GLSL varyings between vertex and fragment shader; - use 64-bit optimised bitset (bitset.h) for render inputs; --- src/mesa/tnl/t_save_api.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/mesa/tnl/t_save_api.c') diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index 9788468d50..5765652b7e 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -936,7 +936,7 @@ static void GLAPIENTRY _save_MultiTexCoord4fv( GLenum target, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib1fNV( GLuint index, GLfloat x ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR1F( index, x ); else enum_error(); @@ -944,7 +944,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) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR1FV( index, v ); else enum_error(); @@ -952,7 +952,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) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR2F( index, x, y ); else enum_error(); @@ -960,7 +960,7 @@ static void GLAPIENTRY _save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat static void GLAPIENTRY _save_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR2FV( index, v ); else enum_error(); @@ -969,7 +969,7 @@ static void GLAPIENTRY _save_VertexAttrib2fvNV( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR3F( index, x, y, z ); else enum_error(); @@ -977,7 +977,7 @@ static void GLAPIENTRY _save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat static void GLAPIENTRY _save_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR3FV( index, v ); else enum_error(); @@ -986,7 +986,7 @@ static void GLAPIENTRY _save_VertexAttrib3fvNV( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR4F( index, x, y, z, w ); else enum_error(); @@ -994,7 +994,7 @@ static void GLAPIENTRY _save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat static void GLAPIENTRY _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_PROGRAM_ATTRIBS) DISPATCH_ATTR4FV( index, v ); else enum_error(); @@ -1004,7 +1004,7 @@ static void GLAPIENTRY _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib1fARB( GLuint index, GLfloat x ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR1F( index, x ); else enum_error(); @@ -1013,7 +1013,7 @@ _save_VertexAttrib1fARB( GLuint index, GLfloat x ) static void GLAPIENTRY _save_VertexAttrib1fvARB( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR1FV( index, v ); else enum_error(); @@ -1022,7 +1022,7 @@ _save_VertexAttrib1fvARB( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR2F( index, x, y ); else enum_error(); @@ -1031,7 +1031,7 @@ _save_VertexAttrib2fARB( GLuint index, GLfloat x, GLfloat y ) static void GLAPIENTRY _save_VertexAttrib2fvARB( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR2FV( index, v ); else enum_error(); @@ -1040,7 +1040,7 @@ _save_VertexAttrib2fvARB( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR3F( index, x, y, z ); else enum_error(); @@ -1049,7 +1049,7 @@ _save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z ) static void GLAPIENTRY _save_VertexAttrib3fvARB( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR3FV( index, v ); else enum_error(); @@ -1058,7 +1058,7 @@ _save_VertexAttrib3fvARB( GLuint index, const GLfloat *v ) static void GLAPIENTRY _save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR4F( index, x, y, z, w ); else enum_error(); @@ -1067,7 +1067,7 @@ _save_VertexAttrib4fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat static void GLAPIENTRY _save_VertexAttrib4fvARB( GLuint index, const GLfloat *v ) { - if (index < VERT_ATTRIB_MAX) + if (index < MAX_VERTEX_ATTRIBS) DISPATCH_ATTR4FV( index, v ); else enum_error(); -- cgit v1.2.3