diff options
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_context.h | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_imm_api.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_imm_debug.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_imm_dlist.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 59 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 14 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 10 |
7 files changed, 35 insertions, 78 deletions
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index db66479dc62..1647fec1287 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -1,8 +1,8 @@ -/* $Id: t_context.h,v 1.43 2002/10/09 19:45:53 brianp Exp $ */ +/* $Id: t_context.h,v 1.44 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 4.1 + * Version: 5.1 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -216,7 +216,7 @@ struct vertex_arrays struct gl_client_array SecondaryColor; GLvector1ui Index; GLvector1ub EdgeFlag; - GLvector4f TexCoord[MAX_TEXTURE_UNITS]; + GLvector4f TexCoord[MAX_TEXTURE_COORD_UNITS]; GLvector1ui Elt; GLvector4f FogCoord; GLvector4f Attribs[VERT_ATTRIB_MAX]; @@ -250,7 +250,7 @@ typedef struct vertex_buffer GLvector4f *NormalPtr; /* VERT_BIT_NORMAL */ GLfloat *NormalLengthPtr; /* VERT_BIT_NORMAL */ GLboolean *EdgeFlag; /* VERT_BIT_EDGEFLAG */ - GLvector4f *TexCoordPtr[MAX_TEXTURE_UNITS]; /* VERT_TEX_0..n */ + GLvector4f *TexCoordPtr[MAX_TEXTURE_COORD_UNITS]; /* VERT_TEX_0..n */ GLvector1ui *IndexPtr[2]; /* VERT_BIT_INDEX */ struct gl_client_array *ColorPtr[2]; /* VERT_BIT_COLOR0 */ struct gl_client_array *SecondaryColorPtr[2];/* VERT_BIT_COLOR1 */ diff --git a/src/mesa/tnl/t_imm_api.c b/src/mesa/tnl/t_imm_api.c index 0cd42d0e48c..462d8dbaf6e 100644 --- a/src/mesa/tnl/t_imm_api.c +++ b/src/mesa/tnl/t_imm_api.c @@ -1,10 +1,10 @@ -/* $Id: t_imm_api.c,v 1.38 2002/12/05 11:49:46 keithw Exp $ */ +/* $Id: t_imm_api.c,v 1.39 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 4.1 + * Version: 5.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 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"), @@ -887,7 +887,7 @@ _tnl_Vertex4fv( const GLfloat *v ) * don't crash. We no-op on invalid targets. */ -#define MAX_TARGET (GL_TEXTURE0_ARB + MAX_TEXTURE_UNITS) +#define MAX_TARGET (GL_TEXTURE0_ARB + MAX_TEXTURE_COORD_UNITS) #define MULTI_TEXCOORD1(target, s) \ { \ diff --git a/src/mesa/tnl/t_imm_debug.c b/src/mesa/tnl/t_imm_debug.c index 14b4f7e4d7e..c87d97cd9b4 100644 --- a/src/mesa/tnl/t_imm_debug.c +++ b/src/mesa/tnl/t_imm_debug.c @@ -1,10 +1,10 @@ -/* $Id: t_imm_debug.c,v 1.9 2002/10/24 23:57:25 brianp Exp $ */ +/* $Id: t_imm_debug.c,v 1.10 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 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"), @@ -127,7 +127,7 @@ void _tnl_print_cassette( struct immediate *IM ) if (req & flags[i] & VERT_BITS_TEX_ANY) { GLuint j; - for (j = 0 ; j < MAX_TEXTURE_UNITS ; j++) { + for (j = 0 ; j < MAX_TEXTURE_COORD_UNITS ; j++) { if (req & flags[i] & VERT_BIT_TEX(j)) { _mesa_debug(NULL, "TC%d %f %f %f %f", j, IM->Attrib[VERT_ATTRIB_TEX0 + j][i][0], diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c index fdd1cfffeb1..39cd0d4f163 100644 --- a/src/mesa/tnl/t_imm_dlist.c +++ b/src/mesa/tnl/t_imm_dlist.c @@ -1,8 +1,8 @@ -/* $Id: t_imm_dlist.c,v 1.44 2002/10/29 20:29:02 brianp Exp $ */ +/* $Id: t_imm_dlist.c,v 1.45 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.1 * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * @@ -569,7 +569,7 @@ static void loopback_compiled_cassette( GLcontext *ctx, struct immediate *IM ) GLuint orflag = IM->OrFlag; GLuint j; void (GLAPIENTRY *vertex)( const GLfloat * ); - void (GLAPIENTRY *texcoordfv[MAX_TEXTURE_UNITS])( GLenum, const GLfloat * ); + void (GLAPIENTRY *texcoordfv[MAX_TEXTURE_COORD_UNITS])( GLenum, const GLfloat * ); GLuint maxtex = 0; GLuint p, length, prim = 0; diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 4776bb0c8be..f445953e9f1 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -1,8 +1,8 @@ -/* $Id: t_vb_program.c,v 1.16 2002/10/31 17:14:16 brianp Exp $ */ +/* $Id: t_vb_program.c,v 1.17 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 5.0 + * Version: 5.1 * * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * @@ -24,55 +24,10 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* - * -------- Regarding NV_vertex_program -------- - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * o Redistribution of the source code must contain a copyright notice - * and this list of conditions; - * - * o Redistribution in binary and source code form must contain the - * following Notice in the software and any documentation and/or other - * materials provided with the distribution; and - * - * o The name of Nvidia may not be used to promote or endorse software - * derived from the software. - * - * NOTICE: Nvidia hereby grants to each recipient a non-exclusive worldwide - * royalty free patent license under patent claims that are licensable by - * Nvidia and which are necessarily required and for which no commercially - * viable non infringing alternative exists to make, use, sell, offer to sell, - * import and otherwise transfer the vertex extension for the Mesa 3D Graphics - * Library as distributed in source code and object code form. No hardware or - * hardware implementation (including a semiconductor implementation and chips) - * are licensed hereunder. If a recipient makes a patent claim or institutes - * patent litigation against Nvidia or Nvidia's customers for use or sale of - * Nvidia products, then this license grant as to such recipient shall - * immediately terminate and recipient immediately agrees to cease use and - * distribution of the Mesa Program and derivatives thereof. - * - * THE MESA 3D GRAPHICS LIBRARY IS PROVIDED ON AN "AS IS BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, - * WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-NFRINGEMENT - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * NVIDIA SHALL NOT HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION - * LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE MESA 3D GRAPHICS - * LIBRARY OR EVIDENCE OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDR, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * If you do not comply with this agreement, then Nvidia may cancel the license - * and rights granted herein. - * --------------------------------------------- - */ /** * \file tnl/t_vb_program.c - * \brief Pipeline stage for executing vertex programs + * \brief Pipeline stage for executing NVIDIA vertex programs. * \author Brian Paul, Keith Whitwell */ @@ -89,7 +44,9 @@ #include "mmath.h" #include "simple_list.h" #include "mtypes.h" -#include "vpexec.h" +#include "nvvertprog.h" +#include "nvvertexec.h" +#include "nvprogram.h" #include "math/m_translate.h" @@ -149,7 +106,7 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage ) struct vp_stage_data *store = VP_STAGE_DATA(stage); struct vertex_buffer *VB = &tnl->vb; struct vp_machine *machine = &(ctx->VertexProgram.Machine); - struct vp_program *program = ctx->VertexProgram.Current; + struct vertex_program *program = ctx->VertexProgram.Current; GLuint i; _mesa_init_tracked_matrices(ctx); /* load registers with matrices */ @@ -202,7 +159,7 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage ) /* execute the program */ ASSERT(program); - _mesa_exec_program(ctx, program); + _mesa_exec_vertex_program(ctx, program); #if 0 printf("Output %d: %f, %f, %f, %f\n", i, diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 4cf198bbac4..f175970f4d7 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -1,8 +1,8 @@ -/* $Id: t_vb_texgen.c,v 1.15 2002/10/29 20:29:04 brianp Exp $ */ +/* $Id: t_vb_texgen.c,v 1.16 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.1 * * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * @@ -59,9 +59,9 @@ struct texgen_stage_data { /* Per-texunit derived state. */ - GLuint TexgenSize[MAX_TEXTURE_UNITS]; - GLuint TexgenHoles[MAX_TEXTURE_UNITS]; - texgen_func TexgenFunc[MAX_TEXTURE_UNITS]; + GLuint TexgenSize[MAX_TEXTURE_COORD_UNITS]; + GLuint TexgenHoles[MAX_TEXTURE_COORD_UNITS]; + texgen_func TexgenFunc[MAX_TEXTURE_COORD_UNITS]; /* Temporary values used in texgen. */ @@ -70,7 +70,7 @@ struct texgen_stage_data { /* Buffered outputs of the stage. */ - GLvector4f texcoord[MAX_TEXTURE_UNITS]; + GLvector4f texcoord[MAX_TEXTURE_COORD_UNITS]; }; @@ -662,7 +662,7 @@ static void free_texgen_data( struct gl_pipeline_stage *stage ) GLuint i; if (store) { - for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) + for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++) if (store->texcoord[i].data) _mesa_vector4f_free( &store->texcoord[i] ); diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index d4c62f443ae..06a678a18da 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -1,10 +1,10 @@ -/* $Id: t_vb_texmat.c,v 1.10 2002/10/29 20:29:04 brianp Exp $ */ +/* $Id: t_vb_texmat.c,v 1.11 2003/01/14 04:55:47 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 5.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 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"), @@ -50,7 +50,7 @@ * is very appealing. */ struct texmat_stage_data { - GLvector4f texcoord[MAX_TEXTURE_UNITS]; + GLvector4f texcoord[MAX_TEXTURE_COORD_UNITS]; }; #define TEXMAT_STAGE_DATA(stage) ((struct texmat_stage_data *)stage->privatePtr) @@ -126,7 +126,7 @@ static void free_texmat_data( struct gl_pipeline_stage *stage ) GLuint i; if (store) { - for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++) + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) if (store->texcoord[i].data) _mesa_vector4f_free( &store->texcoord[i] ); FREE( store ); |