diff options
author | Jouk Jansen <joukj@hrem.stm.tudelft.nl> | 2000-11-22 07:32:16 +0000 |
---|---|---|
committer | Jouk Jansen <joukj@hrem.stm.tudelft.nl> | 2000-11-22 07:32:16 +0000 |
commit | 5e3bc0c2a2bcdf59949410f94c9b705fc1281ce8 (patch) | |
tree | ee6c08673fe9a228afc6960699a3dfff32e9cbab /src/mesa/tnl | |
parent | fbe3726050f2cd69694df9f24986e951b4c2737e (diff) |
Committing in .
Modified Files:
Mesa/macos/gli_api/gliapi1.h Mesa/macos/gli_api/gliapi2.h
Mesa/macos/gli_api/gliapiext.h Mesa/macos/src-gli/fxgli.c
Mesa/macos/src-gli/fxgli.h Mesa/macos/src-gli/fxgli2.c
Mesa/macos/src-gli/fxgli_tridebug.c Mesa/src/accum.c
Mesa/src/accum.h Mesa/src/all.h Mesa/src/alpha.c
Mesa/src/alpha.h Mesa/src/attrib.c Mesa/src/attrib.h
Mesa/src/bitmap.c Mesa/src/bitmap.h Mesa/src/blend.c
Mesa/src/blend.h Mesa/src/buffers.c Mesa/src/buffers.h
Mesa/src/clip.c Mesa/src/clip.h Mesa/src/colortab.h
Mesa/src/config.c Mesa/src/context.c Mesa/src/context.h
Mesa/src/convolve.c Mesa/src/convolve.h Mesa/src/copypix.c
Mesa/src/copypix.h Mesa/src/debug.c Mesa/src/depth.c
Mesa/src/depth.h Mesa/src/dlist.c Mesa/src/dlist.h
Mesa/src/drawpix.c Mesa/src/drawpix.h Mesa/src/enable.c
Mesa/src/enable.h Mesa/src/eval.c Mesa/src/eval.h
Mesa/src/extensions.c Mesa/src/extensions.h
Mesa/src/feedback.c Mesa/src/feedback.h Mesa/src/fog.c
Mesa/src/fog.h Mesa/src/get.c Mesa/src/get.h Mesa/src/glapi.c
Mesa/src/glthread.h Mesa/src/highpc.c Mesa/src/hint.h
Mesa/src/histogram.h Mesa/src/image.c Mesa/src/image.h
Mesa/src/imports.c Mesa/src/light.c Mesa/src/light.h
Mesa/src/lines.c Mesa/src/lines.h Mesa/src/logic.c
Mesa/src/logic.h Mesa/src/masking.c Mesa/src/masking.h
Mesa/src/matrix.c Mesa/src/matrix.h Mesa/src/pixel.c
Mesa/src/pixel.h Mesa/src/points.c Mesa/src/points.h
Mesa/src/polygon.c Mesa/src/polygon.h Mesa/src/rastpos.c
Mesa/src/readpix.c Mesa/src/scissor.c Mesa/src/scissor.h
Mesa/src/state.c Mesa/src/state.h Mesa/src/stencil.c
Mesa/src/stencil.h Mesa/src/teximage.c Mesa/src/teximage.h
Mesa/src/texobj.c Mesa/src/texobj.h Mesa/src/texstate.c
Mesa/src/texstate.h Mesa/src/texture.c Mesa/src/texture.h
Mesa/src/texutil.c Mesa/src/texutil.h Mesa/src/varray.c
Mesa/src/varray.h Mesa/src/X/fakeglx.c Mesa/src/X/xm_api.c
Mesa/src/X/xm_dd.c Mesa/src/X/xm_line.c Mesa/src/X/xm_span.c
Mesa/src/X/xm_tri.c Mesa/src/swrast/s_aaline.c
Mesa/src/swrast/s_aaline.h Mesa/src/swrast/s_aatriangle.h
Mesa/src/swrast/s_accum.h Mesa/src/swrast/s_alpha.h
Mesa/src/swrast/s_alphabuf.h Mesa/src/swrast/s_blend.h
Mesa/src/swrast/s_context.c Mesa/src/swrast/s_context.h
Mesa/src/swrast/s_depth.h Mesa/src/swrast/s_drawpix.h
Mesa/src/swrast/s_feedback.h Mesa/src/swrast/s_fog.h
Mesa/src/swrast/s_histogram.h Mesa/src/swrast/s_lines.h
Mesa/src/swrast/s_logic.h Mesa/src/swrast/s_masking.h
Mesa/src/swrast/s_pb.h Mesa/src/swrast/s_pixeltex.h
Mesa/src/swrast/s_points.h Mesa/src/swrast/s_quads.c
Mesa/src/swrast/s_quads.h Mesa/src/swrast/s_scissor.h
Mesa/src/swrast/s_span.h Mesa/src/swrast/s_stencil.h
Mesa/src/swrast/s_texture.h Mesa/src/swrast/s_triangle.h
Mesa/src/swrast/s_zoom.h Mesa/src/swrast/swrast.h
Mesa/src/swrast_setup/ss_context.h
Mesa/src/swrast_setup/ss_triangle.c
Mesa/src/swrast_setup/ss_triangle.h
Mesa/src/swrast_setup/ss_vb.h Mesa/src/tnl/t_clip.c
Mesa/src/tnl/t_clip.h Mesa/src/tnl/t_context.c
Mesa/src/tnl/t_context.h Mesa/src/tnl/t_cva.c
Mesa/src/tnl/t_cva.h Mesa/src/tnl/t_debug.c
Mesa/src/tnl/t_debug.h Mesa/src/tnl/t_dlist.h
Mesa/src/tnl/t_eval.c Mesa/src/tnl/t_eval.h
Mesa/src/tnl/t_fog.c Mesa/src/tnl/t_fog.h
Mesa/src/tnl/t_light.c Mesa/src/tnl/t_light.h
Mesa/src/tnl/t_pipeline.c Mesa/src/tnl/t_pipeline.h
Mesa/src/tnl/t_shade.c Mesa/src/tnl/t_shade.h
Mesa/src/tnl/t_stages.c Mesa/src/tnl/t_stages.h
Mesa/src/tnl/t_texture.c Mesa/src/tnl/t_texture.h
Mesa/src/tnl/t_trans_elt.c Mesa/src/tnl/t_trans_elt.h
Mesa/src/tnl/t_varray.c Mesa/src/tnl/t_varray.h
Mesa/src/tnl/t_vb.c Mesa/src/tnl/t_vb.h
Mesa/src/tnl/t_vbcull.c Mesa/src/tnl/t_vbcull.h
Mesa/src/tnl/t_vbfill.c Mesa/src/tnl/t_vbfill.h
Mesa/src/tnl/t_vbindirect.c Mesa/src/tnl/t_vbindirect.h
Mesa/src/tnl/t_vbrender.c Mesa/src/tnl/t_vbrender.h
Mesa/src/tnl/t_vbxform.c Mesa/src/tnl/t_vbxform.h
Mesa/src/tnl/tnl.h
Added Files:
Mesa/src/mtypes.h
Removed Files:
Mesa/src/types.h
Changed Mesa/src/types to Mesa/src/mtypes.h to avoid conflicts while
compiling on a VMS system.
----------------------------------------------------------------------
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_context.c | 28 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.h | 76 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.c | 112 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.h | 12 | ||||
-rw-r--r-- | src/mesa/tnl/tnl.h | 10 |
5 files changed, 119 insertions, 119 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index bef6f7f3bb..78608459b9 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -1,4 +1,4 @@ -#include "types.h" +#include "mtypes.h" #include "mem.h" #include "t_context.h" @@ -22,18 +22,18 @@ struct immediate *_mesa_CurrentInput = NULL; #endif -GLboolean +GLboolean _tnl_flush_vertices( GLcontext *ctx, GLuint flush_flags ) { TNLcontext *tnl = TNL_CONTEXT(ctx); struct immediate *IM = TNL_CURRENT_IM(ctx); if ((IM->Flag[IM->Count] & (VERT_BEGIN|VERT_END)) != VERT_END || - (flush_flags & (FLUSH_STORED_VERTICES|FLUSH_UPDATE_CURRENT))) + (flush_flags & (FLUSH_STORED_VERTICES|FLUSH_UPDATE_CURRENT))) { - if (IM->Flag[IM->Start]) + if (IM->Flag[IM->Start]) _mesa_flush_vb( ctx ); - + /* Although this code updates the ctx->Current values, that bit * is left set as there is no easy mechanism to set it * elsewhere. This means that each time core wants to examine @@ -57,7 +57,7 @@ _tnl_CreateContext( GLcontext *ctx ) static int firsttime = 1; /* Onetime initializations. Doesn't really matter if this gets - * done twice: no need for mutexes. + * done twice: no need for mutexes. */ if (firsttime) { firsttime = 0; @@ -88,7 +88,7 @@ _tnl_CreateContext( GLcontext *ctx ) ctx->swtnl_im = (void *)TNL_VB(ctx)->IM; - + /* Initialize tnl state. */ _tnl_dlist_init( ctx ); @@ -113,7 +113,7 @@ _tnl_CreateContext( GLcontext *ctx ) /* Set a few default values in the driver struct. This is a - * temporary mechanism. + * temporary mechanism. */ ctx->Driver.RenderVBCulledTab = _tnl_render_tab_cull; ctx->Driver.RenderVBClippedTab = _tnl_render_tab_clipped; @@ -156,16 +156,16 @@ _tnl_DestroyContext( GLcontext *ctx ) } -/* Update all state that references _NeedEyeCoords +/* Update all state that references _NeedEyeCoords */ void _tnl_LightingSpaceChange( GLcontext *ctx ) { - _tnl_update_normal_transform( ctx ); + _tnl_update_normal_transform( ctx ); } -void +void _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) { if (new_state & _NEW_LIGHT) @@ -177,7 +177,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) if (new_state & _NEW_TEXTURE) if (ctx->_Enabled & ENABLE_TEXGEN_ANY) _tnl_update_texgen( ctx ); - + if (new_state & (_NEW_LIGHT|_NEW_TEXTURE|_NEW_FOG| _DD_NEW_TRI_LIGHT_TWOSIDE | _DD_NEW_SEPERATE_SPECULAR | @@ -191,8 +191,8 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) } void -_tnl_MakeCurrent( GLcontext *ctx, - GLframebuffer *drawBuffer, +_tnl_MakeCurrent( GLcontext *ctx, + GLframebuffer *drawBuffer, GLframebuffer *readBuffer ) { #ifndef THREADS diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 3fb2bd99a8..484b6b12df 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -1,22 +1,22 @@ -/* $Id: t_context.h,v 1.2 2000/11/20 13:39:36 keithw Exp $ */ +/* $Id: t_context.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 - * + * * Copyright (C) 1999 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"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -29,7 +29,7 @@ #define _T_CONTEXT_H #include "glheader.h" -#include "types.h" +#include "mtypes.h" #include "math/m_matrix.h" #include "math/m_vector.h" @@ -73,7 +73,7 @@ /* KW: Flags that describe the current vertex state, and the contents - * of a vertex in a vertex-cassette. + * of a vertex in a vertex-cassette. * * For really major expansion, consider a 'VERT_ADDITIONAL_FLAGS' flag, * which means there is data in another flags array (eg, extra_flags[]). @@ -91,7 +91,7 @@ #define VERT_EDGE 0x200 /* glEdgeFlag */ #define VERT_MATERIAL 0x400 /* glMaterial */ #define VERT_END_VB 0x800 /* end vb marker */ -#define VERT_TEX0_12 0x1000 +#define VERT_TEX0_12 0x1000 #define VERT_TEX0_3 0x2000 #define VERT_TEX0_4 0x4000 #define VERT_TEX1_12 0x8000 @@ -209,7 +209,7 @@ struct vertex_arrays GLvector1ui Index; GLvector1ub EdgeFlag; GLvector4f TexCoord[MAX_TEXTURE_UNITS]; - GLvector1ui Elt; + GLvector1ui Elt; GLvector4ub SecondaryColor; GLvector1f FogCoord; }; @@ -222,9 +222,9 @@ struct vertex_array_pointers GLvector1ui *Index; GLvector1ub *EdgeFlag; GLvector4f *TexCoord[MAX_TEXTURE_UNITS]; - GLvector1ui *Elt; + GLvector1ui *Elt; GLvector4ub *SecondaryColor; - GLvector1f *FogCoord; + GLvector1f *FogCoord; }; /* Values for VB->Type */ @@ -244,14 +244,14 @@ enum { /* KW: Represents everything that can take place between a begin and * end, and can represent multiple begin/end pairs. This plus *any* * state variable (GLcontext) should be all you need to replay the - * represented begin/end pairs as if they took place in that state. + * represented begin/end pairs as if they took place in that state. * * Thus this is sufficient for both immediate and compiled modes, but * we could/should throw some elements away for compiled mode if we - * know they were empty. + * know they were empty. */ -struct immediate -{ +struct immediate +{ struct immediate *next; /* for cache of free IM's */ GLuint id, ref_count; @@ -273,18 +273,18 @@ struct immediate GLuint TF4[MAX_TEXTURE_UNITS]; GLuint Primitive[VB_SIZE]; /* GLubyte would do... */ - GLuint NextPrimitive[VB_SIZE]; + GLuint NextPrimitive[VB_SIZE]; /* allocate storage for these on demand: */ - struct gl_material (*Material)[2]; - GLuint *MaterialMask; + struct gl_material (*Material)[2]; + GLuint *MaterialMask; - GLfloat (*TexCoordPtr[MAX_TEXTURE_UNITS])[4]; + GLfloat (*TexCoordPtr[MAX_TEXTURE_UNITS])[4]; struct vertex_arrays v; - - struct __GLcontextRec *backref; + + struct __GLcontextRec *backref; /* Normal lengths, zero if not available. */ @@ -325,7 +325,7 @@ typedef struct vertex_buffer /* Temporary storage used by immediate mode functions and various * operations in the pipeline. */ - struct immediate *IM; + struct immediate *IM; struct vertex_array_pointers store; /* Where to find outstanding untransformed vertices. @@ -357,16 +357,16 @@ typedef struct vertex_buffer GLvector1f *FogCoordPtr; GLuint *Flag, FlagMax; struct gl_material (*Material)[2]; - GLuint *MaterialMask; + GLuint *MaterialMask; - GLuint *NextPrimitive; - GLuint *Primitive; + GLuint *NextPrimitive; + GLuint *Primitive; GLuint LastPrimitive; GLfloat (*BoundsPtr)[3]; /* Bounds for cull check */ GLfloat *NormalLengthPtr; /* Array of precomputed inv. normal lengths */ - - /* Holds malloced storage for pipeline data not supplied by + + /* Holds malloced storage for pipeline data not supplied by * the immediate struct. */ GLvector4f Eye; @@ -377,11 +377,11 @@ typedef struct vertex_buffer GLvector4ub BSecondary; /* not used in cva vb's */ /* Temporary storage - may point into IM, or be dynamically - * allocated (for cva). + * allocated (for cva). */ GLubyte *ClipMask; GLubyte *UserClipMask; - + /* Internal values. Where these point depends on whether * there were any identity matrices defined as transformations * in the pipeline. @@ -399,7 +399,7 @@ typedef struct vertex_buffer GLvector1ui *Index[2]; GLvector4ub *SecondaryColor[2]; - /* Storage for colors which have been lit but not yet fogged. + /* Storage for colors which have been lit but not yet fogged. * Required for CVA, just point into store for normal VB's. */ GLvector4ub *LitColor[2]; @@ -415,7 +415,7 @@ typedef struct vertex_buffer */ GLuint *EvaluatedFlags; - /* Not used for cva: + /* Not used for cva: */ GLubyte *NormCullStart; GLubyte *CullMask; /* Results of vertex culling */ @@ -442,7 +442,7 @@ typedef void (*gl_shade_func)( struct vertex_buffer *VB ); typedef void (*clip_interp_func)( struct vertex_buffer *VB, GLuint dst, GLfloat t, GLuint in, GLuint out ); -typedef GLuint (*clip_line_func)( struct vertex_buffer *VB, +typedef GLuint (*clip_line_func)( struct vertex_buffer *VB, GLuint *i, GLuint *j, GLubyte mask); @@ -539,7 +539,7 @@ struct gl_cva { -typedef void (*texgen_func)( struct vertex_buffer *VB, +typedef void (*texgen_func)( struct vertex_buffer *VB, GLuint textureSet); @@ -569,7 +569,7 @@ typedef struct tnl_context { */ GLuint opcode_vertex_cassette; - /* Cva + /* Cva */ struct gl_cva CVA; GLboolean CompileCVAFlag; @@ -577,7 +577,7 @@ typedef struct tnl_context { clip_poly_func *_poly_clip_tab; clip_line_func *_line_clip_tab; clip_interp_func _ClipInterpFunc; /* Clip interpolation function */ - normal_func *_NormalTransform; + normal_func *_NormalTransform; gl_shade_func *_shade_func_tab; /* Current shading function table */ GLenum _CurrentPrimitive; /* Prim or GL_POLYGON+1 */ @@ -586,7 +586,7 @@ typedef struct tnl_context { GLuint _RenderFlags; /* Active inputs to render stage */ /* Cache of unused immediate structs */ - struct immediate *freed_im_queue; + struct immediate *freed_im_queue; GLuint nr_im_queued; } TNLcontext; @@ -602,8 +602,8 @@ extern GLboolean _tnl_flush_vertices( GLcontext *ctx, GLuint flush_flags ); extern void -_tnl_MakeCurrent( GLcontext *ctx, - GLframebuffer *drawBuffer, +_tnl_MakeCurrent( GLcontext *ctx, + GLframebuffer *drawBuffer, GLframebuffer *readBuffer ); diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index f323885422..d61f63f9b3 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -1,21 +1,21 @@ -/* $Id: t_pipeline.c,v 1.2 2000/11/20 18:06:13 brianp Exp $ */ +/* $Id: t_pipeline.c,v 1.3 2000/11/22 07:32:18 joukj Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 - * + * * Copyright (C) 1999-2000 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"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -33,7 +33,7 @@ #include "mem.h" #include "mmath.h" #include "state.h" -#include "types.h" +#include "mtypes.h" #include "math/m_translate.h" #include "math/m_xform.h" @@ -57,7 +57,7 @@ void gl_print_pipe_ops( const char *msg, GLuint flags ) { - fprintf(stderr, + fprintf(stderr, "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s\n", msg, flags, @@ -86,9 +86,9 @@ void gl_reset_cva_vb( struct vertex_buffer *VB, GLuint stages ) TNLcontext *tnl = TNL_CONTEXT(ctx); if (MESA_VERBOSE&VERBOSE_PIPELINE) - gl_print_pipe_ops( "reset cva vb", stages ); + gl_print_pipe_ops( "reset cva vb", stages ); - if (stages & PIPE_OP_VERT_XFORM) + if (stages & PIPE_OP_VERT_XFORM) { if (VB->ClipOrMask & CLIP_USER_BIT) MEMSET(VB->UserClipMask, 0, VB->Count); @@ -104,18 +104,18 @@ void gl_reset_cva_vb( struct vertex_buffer *VB, GLuint stages ) VB->NormalPtr = &tnl->CVA.v.Normal; } - if (stages & PIPE_OP_LIGHT) + if (stages & PIPE_OP_LIGHT) { VB->ColorPtr = VB->Color[0] = VB->Color[1] = &tnl->CVA.v.Color; VB->IndexPtr = VB->Index[0] = VB->Index[1] = &tnl->CVA.v.Index; } - else if (stages & PIPE_OP_FOG) + else if (stages & PIPE_OP_FOG) { if (ctx->Light.Enabled) { VB->Color[0] = VB->LitColor[0]; - VB->Color[1] = VB->LitColor[1]; + VB->Color[1] = VB->LitColor[1]; VB->Index[0] = VB->LitIndex[0]; - VB->Index[1] = VB->LitIndex[1]; + VB->Index[1] = VB->LitIndex[1]; } else { VB->Color[0] = VB->Color[1] = &tnl->CVA.v.Color; VB->Index[0] = VB->Index[1] = &tnl->CVA.v.Index; @@ -142,7 +142,7 @@ static void pipeline_ctr( struct gl_pipeline *p, GLcontext *ctx, GLuint type ) p->type = type; p->ops = 0; - for (i = 0 ; i < gl_default_nr_stages ; i++) + for (i = 0 ; i < gl_default_nr_stages ; i++) p->state_change |= gl_default_pipeline[i].state_change; } @@ -151,12 +151,12 @@ void _tnl_pipeline_init( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); - MEMCPY( tnl->PipelineStage, - gl_default_pipeline, + MEMCPY( tnl->PipelineStage, + gl_default_pipeline, sizeof(*gl_default_pipeline) * gl_default_nr_stages ); - + tnl->NrPipelineStages = gl_default_nr_stages; - + pipeline_ctr( &tnl->CVA.elt, ctx, PIPE_IMMEDIATE); pipeline_ctr( &tnl->CVA.pre, ctx, PIPE_PRECALC ); } @@ -189,16 +189,16 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) TNLcontext *tnl = TNL_CONTEXT(ctx); struct gl_pipeline_stage *pipeline = tnl->PipelineStage; struct gl_cva *cva = &tnl->CVA; - struct gl_pipeline *pre = &cva->pre; + struct gl_pipeline *pre = &cva->pre; struct gl_pipeline_stage **stages = pre->stages; GLuint i; GLuint newstate = pre->new_state; GLuint changed_ops = 0; GLuint oldoutputs = pre->outputs; GLuint oldinputs = pre->inputs; - GLuint fallback = (VERT_CURRENT_DATA & tnl->_CurrentFlag & + GLuint fallback = (VERT_CURRENT_DATA & tnl->_CurrentFlag & ~tnl->_ArraySummary); - GLuint changed_outputs = (tnl->_ArrayNewState | + GLuint changed_outputs = (tnl->_ArrayNewState | (fallback & cva->orflag)); GLuint available = fallback | tnl->_ArrayFlags; @@ -213,12 +213,12 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) */ newstate = ~0; - if (tnl->_ArraySummary & VERT_ELT) + if (tnl->_ArraySummary & VERT_ELT) cva->orflag &= VERT_MATERIAL; - + cva->orflag &= ~(tnl->_ArraySummary & ~VERT_OBJ_ANY); available &= ~cva->orflag; - + pre->outputs = available; pre->inputs = available; @@ -226,8 +226,8 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) fprintf(stderr, ": Rebuild pipeline\n"); gl_print_vert_flags("orflag", cva->orflag); } - - + + /* If something changes in the pipeline, tag all subsequent stages * using this value for recalcuation. Also used to build the full @@ -237,16 +237,16 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) * are enough to fully specify what needs to be calculated, and a * single pass identifies all stages requiring recalculation. */ - for (i = 0 ; i < tnl->NrPipelineStages ; i++) + for (i = 0 ; i < tnl->NrPipelineStages ; i++) { pipeline[i].check(ctx, &pipeline[i]); - if (pipeline[i].type & PIPE_PRECALC) + if (pipeline[i].type & PIPE_PRECALC) { if ((newstate & pipeline[i].cva_state_change) || (changed_outputs & pipeline[i].inputs) || !pipeline[i].inputs) - { + { changed_ops |= pipeline[i].ops; changed_outputs |= pipeline[i].outputs; pipeline[i].active &= ~PIPE_PRECALC; @@ -256,9 +256,9 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) { pipeline[i].active |= PIPE_PRECALC; *stages++ = &pipeline[i]; - } + } } - + /* Incompatible with multiple stages structs implementing * the same stage. */ @@ -271,8 +271,8 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) available |= pipeline[i].outputs; pre->forbidden_inputs |= pipeline[i].pre_forbidden_inputs; } - } - else if (pipeline[i].active & PIPE_PRECALC) + } + else if (pipeline[i].active & PIPE_PRECALC) { pipeline[i].active &= ~PIPE_PRECALC; changed_outputs |= pipeline[i].outputs; @@ -293,8 +293,8 @@ static void build_full_precalc_pipeline( GLcontext *ctx ) void gl_build_precalc_pipeline( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); - struct gl_pipeline *pre = &tnl->CVA.pre; - struct gl_pipeline *elt = &tnl->CVA.elt; + struct gl_pipeline *pre = &tnl->CVA.pre; + struct gl_pipeline *elt = &tnl->CVA.elt; if (!ctx->Driver.BuildPrecalcPipeline || !ctx->Driver.BuildPrecalcPipeline( ctx )) @@ -303,11 +303,11 @@ void gl_build_precalc_pipeline( GLcontext *ctx ) pre->data_valid = 0; pre->pipeline_valid = 1; elt->pipeline_valid = 0; - + tnl->CVA.orflag = 0; - + if (MESA_VERBOSE&VERBOSE_PIPELINE) - gl_print_pipeline( ctx, pre ); + gl_print_pipeline( ctx, pre ); } @@ -316,7 +316,7 @@ static void build_full_immediate_pipeline( GLcontext *ctx ) TNLcontext *tnl = TNL_CONTEXT(ctx); struct gl_pipeline_stage *pipeline = tnl->PipelineStage; struct gl_cva *cva = &tnl->CVA; - struct gl_pipeline *pre = &cva->pre; + struct gl_pipeline *pre = &cva->pre; struct gl_pipeline *elt = &cva->elt; struct gl_pipeline_stage **stages = elt->stages; GLuint i; @@ -340,17 +340,17 @@ static void build_full_immediate_pipeline( GLcontext *ctx ) pipeline[i].active &= ~PIPE_IMMEDIATE; if ((pipeline[i].state_change & newstate) || - (pipeline[i].elt_forbidden_inputs & available)) + (pipeline[i].elt_forbidden_inputs & available)) { pipeline[i].check(ctx, &pipeline[i]); } if ((pipeline[i].type & PIPE_IMMEDIATE) && - (pipeline[i].ops & active_ops) == 0 && + (pipeline[i].ops & active_ops) == 0 && (pipeline[i].elt_forbidden_inputs & available) == 0 ) { - if (pipeline[i].inputs & ~available) + if (pipeline[i].inputs & ~available) elt->forbidden_inputs |= pipeline[i].inputs & ~available; else { @@ -366,7 +366,7 @@ static void build_full_immediate_pipeline( GLcontext *ctx ) } *stages = 0; - + elt->copy_transformed_data = 1; elt->replay_copied_vertices = 0; @@ -381,7 +381,7 @@ static void build_full_immediate_pipeline( GLcontext *ctx ) void gl_build_immediate_pipeline( GLcontext *ctx ) { TNLcontext *tnl = TNL_CONTEXT(ctx); - struct gl_pipeline *elt = &tnl->CVA.elt; + struct gl_pipeline *elt = &tnl->CVA.elt; if (!ctx->Driver.BuildEltPipeline || !ctx->Driver.BuildEltPipeline( ctx )) { @@ -390,11 +390,11 @@ void gl_build_immediate_pipeline( GLcontext *ctx ) elt->pipeline_valid = 1; tnl->CVA.orflag = 0; - + if (MESA_VERBOSE&VERBOSE_PIPELINE) - gl_print_pipeline( ctx, elt ); + gl_print_pipeline( ctx, elt ); } - + #define INTERESTED ~0 void gl_update_pipelines( GLcontext *ctx ) @@ -412,17 +412,17 @@ void gl_update_pipelines( GLcontext *ctx ) cva->lock_changed || cva->orflag != cva->last_orflag || tnl->_ArrayFlags != cva->last_array_flags) - { + { GLuint flags = VERT_WIN; if (ctx->Visual.RGBAflag) { flags |= VERT_RGBA; if (ctx->_TriangleCaps && DD_SEPERATE_SPECULAR) flags |= VERT_SPEC_RGB; - } else + } else flags |= VERT_INDEX; - if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) + if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) flags |= VERT_TEX0_ANY; if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY) @@ -436,10 +436,10 @@ void gl_update_pipelines( GLcontext *ctx ) if (ctx->Texture._ReallyEnabled & TEXTURE3_ANY) flags |= VERT_TEX3_ANY; #endif - - if (ctx->Polygon._Unfilled) + + if (ctx->Polygon._Unfilled) flags |= VERT_EDGE; - + if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) flags |= VERT_FOG_COORD; @@ -485,10 +485,10 @@ void gl_run_pipeline( struct vertex_buffer *VB ) pipe->data_valid = 1; /* optimized stages might want to reset this. */ if (0) gl_print_pipeline( VB->ctx, pipe ); - + START_FAST_MATH(x); - - for ( VB->Culled = 0; *stages && !VB->Culled ; stages++ ) + + for ( VB->Culled = 0; *stages && !VB->Culled ; stages++ ) (*stages)->run( VB ); END_FAST_MATH(x); diff --git a/src/mesa/tnl/t_pipeline.h b/src/mesa/tnl/t_pipeline.h index 36a2f066c2..5609b79af9 100644 --- a/src/mesa/tnl/t_pipeline.h +++ b/src/mesa/tnl/t_pipeline.h @@ -1,21 +1,21 @@ -/* $Id: t_pipeline.h,v 1.1 2000/11/16 21:05:42 keithw Exp $ */ +/* $Id: t_pipeline.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */ /* * Mesa 3-D graphics library * Version: 3.5 - * + * * Copyright (C) 1999 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"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -33,7 +33,7 @@ #ifndef _T_PIPELINE_H_ #define _T_PIPELINE_H_ -#include "types.h" +#include "mtypes.h" #include "t_context.h" extern void gl_update_materials( struct vertex_buffer *VB); diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index dc46ef3134..c820776590 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -1,19 +1,19 @@ /* * Mesa 3-D graphics library * Version: 3.5 - * + * * Copyright (C) 1999 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"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -28,7 +28,7 @@ #ifndef _TNL_H #define _TNL_H -#include "types.h" +#include "mtypes.h" |