Changeset 3598 for trunk/src/opengl/mesa/3dfx/fxpipeline.c
- Timestamp:
- May 23, 2000, 10:41:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/3dfx/fxpipeline.c
r2938 r3598 3 3 /* 4 4 * Mesa 3-D graphics library 5 * Version: 3. 15 * Version: 3.3 6 6 * 7 7 * Copyright (C) 1999 Brian Paul All Rights Reserved. … … 65 65 ((ctx->Texture.ReallyEnabled & 0xf) && VB->TexCoordPtr[0]->size>2) || 66 66 ((ctx->Texture.ReallyEnabled & 0xf0) && VB->TexCoordPtr[1]->size>2) || 67 (VB->ClipPtr->size != 4)) /* Brokes clipping otherwise*/67 (VB->ClipPtr->size != 4)) /* Brokes clipping otherwise*/ 68 68 gl_render_elts( VB ); 69 else 69 else 70 70 fxDDRenderElementsDirect( VB ); 71 71 } 72 72 73 static void fxDDCheckRenderVBIndirect( GLcontext *ctx, 74 75 { 73 static void fxDDCheckRenderVBIndirect( GLcontext *ctx, 74 struct gl_pipeline_stage *d ) 75 { 76 76 d->type = 0; 77 77 78 78 if ((ctx->IndirectTriangles & DD_SW_SETUP) == 0 && 79 ctx->Driver.MultipassFunc == 0) 79 ctx->Driver.MultipassFunc == 0) 80 80 { 81 81 d->type = PIPE_IMMEDIATE; 82 82 d->inputs = VERT_SETUP_FULL | VERT_ELT | VERT_PRECALC_DATA; 83 } 83 } 84 84 } 85 85 … … 122 122 */ 123 123 GLuint fxDDRegisterPipelineStages( struct gl_pipeline_stage *out, 124 125 124 const struct gl_pipeline_stage *in, 125 GLuint nr ) 126 126 { 127 127 GLuint i, o; … … 130 130 switch (in[i].ops) { 131 131 case PIPE_OP_RAST_SETUP_1|PIPE_OP_RENDER: 132 133 134 135 out[o].run = fxDDMergeAndRender; 136 137 132 out[o] = in[i]; 133 out[o].state_change = NEW_CLIENT_STATE; 134 out[o].check = fxDDCheckMergeAndRender; 135 out[o].run = fxDDMergeAndRender; 136 o++; 137 break; 138 138 case PIPE_OP_RAST_SETUP_0: 139 140 141 142 143 144 145 139 out[o] = in[i]; 140 out[o].cva_state_change = NEW_LIGHTING|NEW_TEXTURING|NEW_RASTER_OPS; 141 out[o].state_change = ~0; 142 out[o].check = fxDDCheckPartialRasterSetup; 143 out[o].run = fxDDPartialRasterSetup; 144 o++; 145 break; 146 146 case PIPE_OP_RAST_SETUP_0|PIPE_OP_RAST_SETUP_1: 147 148 149 150 147 out[o] = in[i]; 148 out[o].run = fxDDDoRasterSetup; 149 o++; 150 break; 151 151 case PIPE_OP_RENDER: 152 153 154 out[o].run = fxDDRenderElements;155 156 157 158 159 out[o].run = fxDDRenderVB;160 161 162 163 152 out[o] = in[i]; 153 if (in[i].run == gl_render_elts) { 154 out[o].run = fxDDRenderElements; 155 } else if (in[i].run == gl_render_vb_indirect) { 156 out[o].check = fxDDCheckRenderVBIndirect; 157 out[o].run = fxDDRenderVBIndirect; 158 } else if (in[i].run == gl_render_vb) { 159 out[o].run = fxDDRenderVB; 160 } 161 162 o++; 163 break; 164 164 default: 165 166 165 out[o++] = in[i]; 166 break; 167 167 } 168 168 } … … 171 171 } 172 172 173 #define ILLEGAL_ENABLES (TEXTURE0_3D| 174 TEXTURE1_3D|\175 ENABLE_TEXMAT0 |\176 ENABLE_TEXMAT1 |\177 ENABLE_TEXGEN0 |\178 ENABLE_TEXGEN1 |\179 ENABLE_USERCLIP |\180 ENABLE_LIGHT |\181 182 183 184 173 #define ILLEGAL_ENABLES (TEXTURE0_3D| \ 174 TEXTURE1_3D| \ 175 ENABLE_TEXMAT0 | \ 176 ENABLE_TEXMAT1 | \ 177 ENABLE_TEXGEN0 | \ 178 ENABLE_TEXGEN1 | \ 179 ENABLE_USERCLIP | \ 180 ENABLE_LIGHT | \ 181 ENABLE_FOG) 182 183 184 185 185 /* Because this is slotted in by the OptimizePipeline function, most 186 186 * of the information here is just for gl_print_pipeline(). Only the 187 * run member is required. 187 * run member is required. 188 188 */ 189 189 static struct gl_pipeline_stage fx_fast_stage = { … … 199 199 0, 200 200 0, 201 0, 201 0, /* never called */ 202 202 fxDDFastPath 203 203 }; … … 210 210 */ 211 211 GLboolean fxDDBuildPrecalcPipeline( GLcontext *ctx ) 212 { 212 { 213 213 struct gl_pipeline *pipe = &ctx->CVA.pre; 214 214 fxMesaContext fxMesa = FX_CONTEXT(ctx); 215 215 216 216 217 217 if (fxMesa->is_in_hardware && 218 fxMesa->render_index == 0 && 218 fxMesa->render_index == 0 && 219 219 (ctx->Enabled & ILLEGAL_ENABLES) == 0 && 220 220 (ctx->Array.Flags & (VERT_OBJ_234| 221 222 223 221 VERT_TEX0_4| 222 VERT_TEX1_4| 223 VERT_ELT)) == (VERT_OBJ_23|VERT_ELT)) 224 224 { 225 if (MESA_VERBOSE & (VERBOSE_STATE|VERBOSE_DRIVER)) 226 227 225 if (MESA_VERBOSE & (VERBOSE_STATE|VERBOSE_DRIVER)) 226 if (!fxMesa->using_fast_path) 227 fprintf(stderr, "fxMesa: using fast path\n"); 228 228 229 229 pipe->stages[0] = &fx_fast_stage; … … 233 233 fxMesa->using_fast_path = 1; 234 234 return 1; 235 } 236 237 if (fxMesa->using_fast_path) 235 } 236 237 if (fxMesa->using_fast_path) 238 238 { 239 if (MESA_VERBOSE & (VERBOSE_STATE|VERBOSE_DRIVER)) 240 241 242 243 244 245 239 if (MESA_VERBOSE & (VERBOSE_STATE|VERBOSE_DRIVER)) 240 fprintf(stderr, "fxMesa: fall back to full pipeline %x %x %x %x %x\n", 241 fxMesa->is_in_hardware, 242 fxMesa->render_index, 243 (ctx->Enabled & ILLEGAL_ENABLES), 244 (ctx->Array.Summary & (VERT_OBJ_23)), 245 (ctx->Array.Summary & (VERT_OBJ_4|VERT_TEX0_4|VERT_TEX1_4))); 246 246 247 247 fxMesa->using_fast_path = 0; … … 251 251 return 0; 252 252 } 253 253 254 254 return 0; 255 255 } … … 271 271 272 272 if (fxMesa->is_in_hardware && 273 fxMesa->render_index == 0 && 273 fxMesa->render_index == 0 && 274 274 (ctx->Enabled & ILLEGAL_ENABLES) == 0 && 275 275 (ctx->Array.Summary & VERT_ELT))
Note:
See TracChangeset
for help on using the changeset viewer.