From 22144ab7552f0799bcfca506bf4ffa7f70a06649 Mon Sep 17 00:00:00 2001 From: Gareth Hughes Date: Mon, 12 Mar 2001 00:48:37 +0000 Subject: Consistent copyright info (version number, date) across all files. --- src/mesa/array_cache/ac_context.c | 10 ++-- src/mesa/array_cache/ac_context.h | 9 ++-- src/mesa/array_cache/ac_import.c | 111 +++++++++++++++++++------------------- src/mesa/array_cache/acache.h | 40 +++++++------- 4 files changed, 85 insertions(+), 85 deletions(-) (limited to 'src/mesa/array_cache') diff --git a/src/mesa/array_cache/ac_context.c b/src/mesa/array_cache/ac_context.c index 5f3115baef..2e11414079 100644 --- a/src/mesa/array_cache/ac_context.c +++ b/src/mesa/array_cache/ac_context.c @@ -1,10 +1,10 @@ -/* $Id: ac_context.c,v 1.2 2001/02/04 00:47:28 keithw Exp $ */ +/* $Id: ac_context.c,v 1.3 2001/03/12 00:48:41 gareth Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 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"), @@ -23,7 +23,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * Author: + * Authors: * Keith Whitwell */ @@ -40,7 +40,7 @@ static void _ac_fallbacks_init( GLcontext *ctx ) ACcontext *ac = AC_CONTEXT(ctx); struct gl_client_array *cl; GLuint i; - + cl = &ac->Fallback.Normal; cl->Size = 3; cl->Type = GL_FLOAT; @@ -243,7 +243,7 @@ void _ac_DestroyContext( GLcontext *ctx ) if (ac->Cache.FogCoord.Ptr) FREE( ac->Cache.FogCoord.Ptr ); for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - if (ac->Cache.TexCoord[i].Ptr) + if (ac->Cache.TexCoord[i].Ptr) FREE( ac->Cache.TexCoord[i].Ptr ); } diff --git a/src/mesa/array_cache/ac_context.h b/src/mesa/array_cache/ac_context.h index 986c9b8e23..18a639b3f8 100644 --- a/src/mesa/array_cache/ac_context.h +++ b/src/mesa/array_cache/ac_context.h @@ -1,11 +1,10 @@ - -/* $Id: ac_context.h,v 1.2 2001/02/04 00:47:28 keithw Exp $ */ +/* $Id: ac_context.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 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"), @@ -24,7 +23,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * Author: + * Authors: * Keith Whitwell */ @@ -85,7 +84,7 @@ typedef struct { struct ac_array_flags IsCached; GLuint start; GLuint count; - + /* Facility for importing element lists: */ GLuint *Elts; diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c index 863f304da3..3ffcdd6fed 100644 --- a/src/mesa/array_cache/ac_import.c +++ b/src/mesa/array_cache/ac_import.c @@ -1,4 +1,4 @@ -/* $Id: ac_import.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */ +/* $Id: ac_import.c,v 1.9 2001/03/12 00:48:41 gareth Exp $ */ /* * Mesa 3-D graphics library @@ -23,7 +23,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * Author: + * Authors: * Keith Whitwell */ @@ -35,7 +35,7 @@ #include "math/m_translate.h" #include "array_cache/ac_context.h" -#include "math/m_translate.h" +#include "math/m_translate.h" #define STRIDE_ARRAY( array, offset ) \ do { \ @@ -59,7 +59,7 @@ static void reset_texcoord( GLcontext *ctx, GLuint unit ) else { ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit]; - if (ctx->Current.Texcoord[unit][3] != 1.0) + if (ctx->Current.Texcoord[unit][3] != 1.0) ac->Raw.TexCoord[unit].Size = 4; else if (ctx->Current.Texcoord[unit][2] != 0.0) ac->Raw.TexCoord[unit].Size = 3; @@ -108,7 +108,7 @@ static void reset_color( GLcontext *ctx ) ac->Raw.Color = ctx->Array.Color; STRIDE_ARRAY(ac->Raw.Color, ac->start); } - else + else ac->Raw.Color = ac->Fallback.Color; ac->IsCached.Color = GL_FALSE; @@ -124,7 +124,7 @@ static void reset_secondarycolor( GLcontext *ctx ) ac->Raw.SecondaryColor = ctx->Array.SecondaryColor; STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start); } - else + else ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor; ac->IsCached.SecondaryColor = GL_FALSE; @@ -140,7 +140,7 @@ static void reset_index( GLcontext *ctx ) ac->Raw.Index = ctx->Array.Index; STRIDE_ARRAY(ac->Raw.Index, ac->start); } - else + else ac->Raw.Index = ac->Fallback.Index; ac->IsCached.Index = GL_FALSE; @@ -155,7 +155,7 @@ static void reset_fogcoord( GLcontext *ctx ) ac->Raw.FogCoord = ctx->Array.FogCoord; STRIDE_ARRAY(ac->Raw.FogCoord, ac->start); } - else + else ac->Raw.FogCoord = ac->Fallback.FogCoord; ac->IsCached.FogCoord = GL_FALSE; @@ -170,7 +170,7 @@ static void reset_edgeflag( GLcontext *ctx ) ac->Raw.EdgeFlag = ctx->Array.EdgeFlag; STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start); } - else + else ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag; ac->IsCached.EdgeFlag = GL_FALSE; @@ -192,13 +192,13 @@ static void import_texcoord( GLcontext *ctx, GLuint unit, ASSERT(type == GL_FLOAT); ASSERT(stride == 4*sizeof(GLfloat) || stride == 0); ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize); - + _math_trans_4f( (GLfloat (*)[4]) to->Ptr, from->Ptr, from->StrideB, from->Type, from->Size, - ac->start, + ac->start, ac->count); to->Size = from->Size; @@ -224,7 +224,7 @@ static void import_vertex( GLcontext *ctx, from->StrideB, from->Type, from->Size, - 0, + 0, ac->count - ac->start); to->Size = from->Size; @@ -249,7 +249,7 @@ static void import_normal( GLcontext *ctx, from->Ptr, from->StrideB, from->Type, - 0, + 0, ac->count - ac->start); to->StrideB = 3 * sizeof(GLfloat); @@ -275,7 +275,7 @@ static void import_color( GLcontext *ctx, from->StrideB, from->Type, from->Size, - 0, + 0, ac->count - ac->start); to->Size = from->Size; @@ -300,7 +300,7 @@ static void import_index( GLcontext *ctx, from->Ptr, from->StrideB, from->Type, - 0, + 0, ac->count - ac->start); to->StrideB = sizeof(GLuint); @@ -325,7 +325,7 @@ static void import_secondarycolor( GLcontext *ctx, from->StrideB, from->Type, from->Size, - 0, + 0, ac->count - ac->start); to->StrideB = 4 * sizeof(GLchan); @@ -349,9 +349,9 @@ static void import_fogcoord( GLcontext *ctx, from->Ptr, from->StrideB, from->Type, - 0, + 0, ac->count - ac->start); - + to->StrideB = sizeof(GLfloat); to->Type = GL_FLOAT; ac->IsCached.FogCoord = GL_TRUE; @@ -373,9 +373,9 @@ static void import_edgeflag( GLcontext *ctx, from->Ptr, from->StrideB, from->Type, - 0, + 0, ac->count - ac->start); - + to->StrideB = sizeof(GLfloat); to->Type = GL_FLOAT; ac->IsCached.EdgeFlag = GL_TRUE; @@ -385,10 +385,10 @@ static void import_edgeflag( GLcontext *ctx, /* Externals to request arrays with specific properties: */ -struct gl_client_array *_ac_import_texcoord( GLcontext *ctx, +struct gl_client_array *_ac_import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwriteable, GLboolean *writeable ) @@ -409,7 +409,7 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx, */ if (ac->Raw.TexCoord[unit].Type != type || (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.TexCoord[unit]) import_texcoord(ctx, unit, type, reqstride ); @@ -422,9 +422,9 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx, } } -struct gl_client_array *_ac_import_vertex( GLcontext *ctx, +struct gl_client_array *_ac_import_vertex( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwriteable, GLboolean *writeable ) @@ -445,7 +445,7 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx, */ if (ac->Raw.Vertex.Type != type || (reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.Vertex) import_vertex(ctx, type, reqstride ); @@ -458,9 +458,9 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx, } } -struct gl_client_array *_ac_import_normal( GLcontext *ctx, +struct gl_client_array *_ac_import_normal( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwriteable, GLboolean *writeable ) { @@ -468,14 +468,14 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_NORMAL) + if (ac->NewArrayState & _NEW_ARRAY_NORMAL) reset_normal( ctx ); /* Do we need to pull in a copy of the client data: */ if (ac->Raw.Normal.Type != type || (reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.Normal) import_normal(ctx, type, reqstride ); @@ -488,9 +488,9 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx, } } -struct gl_client_array *_ac_import_color( GLcontext *ctx, +struct gl_client_array *_ac_import_color( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwriteable, GLboolean *writeable ) @@ -499,7 +499,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_COLOR) + if (ac->NewArrayState & _NEW_ARRAY_COLOR) reset_color( ctx ); /* Is the request impossible? @@ -512,7 +512,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx, */ if (ac->Raw.Color.Type != type || (reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.Color) import_color(ctx, type, reqstride ); @@ -525,9 +525,9 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx, } } -struct gl_client_array *_ac_import_index( GLcontext *ctx, +struct gl_client_array *_ac_import_index( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwriteable, GLboolean *writeable ) { @@ -535,7 +535,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_INDEX) + if (ac->NewArrayState & _NEW_ARRAY_INDEX) reset_index( ctx ); @@ -543,7 +543,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx, */ if (ac->Raw.Index.Type != type || (reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.Index) import_index(ctx, type, reqstride ); @@ -556,9 +556,9 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx, } } -struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, +struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwriteable, GLboolean *writeable ) @@ -567,7 +567,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR) + if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR) reset_secondarycolor( ctx ); /* Is the request impossible? @@ -579,7 +579,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, */ if (ac->Raw.SecondaryColor.Type != type || (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.SecondaryColor) import_secondarycolor(ctx, type, reqstride ); @@ -592,9 +592,9 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx, } } -struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx, +struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwriteable, GLboolean *writeable ) { @@ -602,14 +602,14 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD) + if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD) reset_fogcoord( ctx ); /* Do we need to pull in a copy of the client data: */ if (ac->Raw.FogCoord.Type != type || (reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.FogCoord) import_fogcoord(ctx, type, reqstride ); @@ -625,9 +625,9 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx, -struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx, +struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwriteable, GLboolean *writeable ) { @@ -635,14 +635,14 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx, /* Can we keep the existing version? */ - if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG) + if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG) reset_edgeflag( ctx ); /* Do we need to pull in a copy of the client data: */ if (ac->Raw.EdgeFlag.Type != type || (reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) || - reqwriteable) + reqwriteable) { if (!ac->IsCached.EdgeFlag) import_edgeflag(ctx, type, reqstride ); @@ -660,7 +660,7 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx, /* Clients must call this function to validate state and set bounds - * before importing any data: + * before importing any data: */ void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count ) { @@ -685,7 +685,7 @@ void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count ) * the whole locked range always be dealt with, otherwise hard to * maintain cached data in the face of clipping. */ - ac->NewArrayState |= ~ctx->Array._Enabled; + ac->NewArrayState |= ~ctx->Array._Enabled; ac->start = ctx->Array.LockFirst; ac->count = ctx->Array.LockCount; ASSERT(ac->start == start); /* hmm? */ @@ -706,13 +706,13 @@ _ac_import_elements( GLcontext *ctx, CONST void *indices ) { ACcontext *ac = AC_CONTEXT(ctx); - + if (old_type == new_type) return indices; if (ac->elt_size < count * sizeof(GLuint)) { if (ac->Elts) FREE(ac->Elts); - while (ac->elt_size < count * sizeof(GLuint)) + while (ac->elt_size < count * sizeof(GLuint)) ac->elt_size *= 2; ac->Elts = (GLuint *) MALLOC(ac->elt_size); } @@ -727,7 +727,7 @@ _ac_import_elements( GLcontext *ctx, case GL_UNSIGNED_INT: { GLuint *out = (GLuint *)ac->Elts; GLuint i; - + switch (old_type) { case GL_UNSIGNED_BYTE: { CONST GLubyte *in = (CONST GLubyte *)indices; @@ -754,4 +754,3 @@ _ac_import_elements( GLcontext *ctx, return 0; } - diff --git a/src/mesa/array_cache/acache.h b/src/mesa/array_cache/acache.h index 268723954c..6cb2115354 100644 --- a/src/mesa/array_cache/acache.h +++ b/src/mesa/array_cache/acache.h @@ -1,8 +1,10 @@ +/* $Id: acache.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 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"), @@ -41,71 +43,71 @@ extern void _ac_InvalidateState( GLcontext *ctx, GLuint new_state ); extern struct gl_client_array * -_ac_import_texcoord( GLcontext *ctx, +_ac_import_texcoord( GLcontext *ctx, GLuint unit, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_vertex( GLcontext *ctx, +_ac_import_vertex( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_normal( GLcontext *ctx, +_ac_import_normal( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_color( GLcontext *ctx, +_ac_import_color( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_index( GLcontext *ctx, +_ac_import_index( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_secondarycolor( GLcontext *ctx, +_ac_import_secondarycolor( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLuint reqsize, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_fogcoord( GLcontext *ctx, +_ac_import_fogcoord( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwritable, GLboolean *writable ); extern struct gl_client_array * -_ac_import_edgeflag( GLcontext *ctx, +_ac_import_edgeflag( GLcontext *ctx, GLenum type, - GLuint reqstride, + GLuint reqstride, GLboolean reqwritable, GLboolean *writable ); /* Clients must call this function to validate state and set bounds - * before importing any data: + * before importing any data: */ -extern void +extern void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count ); -- cgit v1.2.3