Changeset 3598 for trunk/src/opengl/mesa/3dfx/fxtrifuncs.c
- Timestamp:
- May 23, 2000, 10:41:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/opengl/mesa/3dfx/fxtrifuncs.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. … … 58 58 59 59 60 /* Is this enough? Do we need more triangle funcs? 60 /* Is this enough? Do we need more triangle funcs? 61 61 */ 62 62 static triangle_func tri_tab[0x40]; /* only 0x20 actually used */ … … 129 129 #include "fxtritmp.h" 130 130 131 /* We don't actually do antialiasing correctly. Geometry has to be 132 sorted for glide's antialiasing to operate */ 133 #if 0 131 134 #define IND (FX_ANTIALIAS) 132 135 #define TAG(x) x##_aa … … 192 195 #define TAG(x) x##_aa_flat_front_back_twoside_offset 193 196 #include "fxtritmp.h" 194 195 196 void fxDDTrifuncInit() 197 #endif 198 199 void fxDDTrifuncInit() 197 200 { 198 201 init(); … … 212 215 init_flat_front_back_twoside(); 213 216 init_flat_front_back_twoside_offset(); 217 #if 0 214 218 init_aa(); 215 219 init_aa_offset(); … … 228 232 init_aa_flat_front_back_twoside(); 229 233 init_aa_flat_front_back_twoside_offset(); 234 #endif 230 235 } 231 236 … … 233 238 { 234 239 fprintf(stderr, "%s: (%x) %s%s%s%s%s%s\n", 235 236 237 238 239 240 241 240 msg, state, 241 (state & FX_ANTIALIAS) ? "antialias, " : "", 242 (state & FX_FLAT) ? "flat, " : "", 243 (state & FX_TWOSIDE) ? "twoside, " : "", 244 (state & FX_OFFSET) ? "offset, " : "", 245 (state & FX_FRONT_BACK) ? "front-back, " : "", 246 (state & FX_FALLBACK) ? "fallback" : ""); 242 247 } 243 248 … … 246 251 { 247 252 fprintf(stderr, "%s: (%x) %s %s%s %s%s\n", 248 249 250 251 252 253 253 msg, state, 254 (state & GR_STWHINT_W_DIFF_FBI) ? "w-fbi, " : "", 255 (state & GR_STWHINT_W_DIFF_TMU0) ? "w-tmu0, " : "", 256 (state & GR_STWHINT_ST_DIFF_TMU0) ? "st-tmu0, " : "", 257 (state & GR_STWHINT_W_DIFF_TMU1) ? "w-tmu1, " : "", 258 (state & GR_STWHINT_ST_DIFF_TMU1) ? "st-tmu1, " : ""); 254 259 255 260 } … … 265 270 266 271 if (flags) { 267 if (fxMesa->render_index & FX_OFFSET) 268 272 if (fxMesa->render_index & FX_OFFSET) 273 FX_grDepthBiasLevel(0); 269 274 270 275 if (flags & (DD_SELECT|DD_FEEDBACK)) { 271 fxMesa->PointsFunc = 0; 272 fxMesa->LineFunc = 0; 273 fxMesa->TriangleFunc = 0; 274 fxMesa->QuadFunc = 0; 275 fxMesa->render_index = FX_FALLBACK; 276 ctx->IndirectTriangles |= DD_SW_RASTERIZE; 277 return; 276 fxMesa->PointsFunc = 0; 277 fxMesa->LineFunc = 0; 278 fxMesa->TriangleFunc = 0; 279 fxMesa->QuadFunc = 0; 280 fxMesa->render_index = FX_FALLBACK; 281 ctx->IndirectTriangles |= DD_SW_RASTERIZE; 282 #if 0 283 fprintf(stderr, "Fallback select|feeback\n"); 284 #endif 285 return; 278 286 } 279 287 280 288 if (flags & DD_FLATSHADE) ind |= FX_FLAT; 281 289 if (flags & DD_TRI_LIGHT_TWOSIDE) ind |= FX_TWOSIDE; 282 290 if (flags & DD_MULTIDRAW) ind |= FX_FRONT_BACK; 283 if (flags & DD_POINT_SMOOTH) ind |= FX_ANTIALIAS; 284 if (flags & (DD_POINT_SIZE|DD_POINT_ATTEN)) ind |= FX_FALLBACK; 291 if (flags & (DD_POINT_ATTEN|DD_POINT_SMOOTH)) { 292 ind |= FX_FALLBACK; 293 #if 0 294 if (flags&DD_POINT_ATTEN) 295 fprintf(stderr, "Fallback point atten\n"); 296 if (flags&DD_POINT_SMOOTH) 297 fprintf(stderr, "Fallback point smooth\n"); 298 #endif 299 } 285 300 286 301 fxMesa->render_index = ind; 287 302 fxMesa->PointsFunc = points_tab[ind]; 288 303 if (ind&FX_FALLBACK) 289 304 ctx->IndirectTriangles |= DD_POINT_SW_RASTERIZE; 290 305 ind &= ~(FX_ANTIALIAS|FX_FALLBACK); 291 306 292 if (flags & DD_LINE_SMOOTH) ind |= FX_ANTIALIAS; 293 if (flags & (DD_LINE_WIDTH|DD_LINE_STIPPLE)) ind |= FX_FALLBACK; 307 if (flags & (DD_LINE_STIPPLE|DD_LINE_SMOOTH)) { 308 ind |= FX_FALLBACK; 309 #if 0 310 if (flags&DD_LINE_STIPPLE) 311 fprintf(stderr, "Fallback line stipple\n"); 312 if (flags&DD_LINE_SMOOTH) 313 fprintf(stderr, "Fallback line smooth\n"); 314 #endif 315 } 294 316 295 317 fxMesa->render_index |= ind; 296 318 fxMesa->LineFunc = line_tab[ind]; 297 319 if (ind&FX_FALLBACK) 298 320 ctx->IndirectTriangles |= DD_LINE_SW_RASTERIZE; 299 321 ind &= ~(FX_ANTIALIAS|FX_FALLBACK); 300 322 301 if (flags & DD_TRI_SMOOTH) ind |= FX_ANTIALIAS;302 323 if (flags & DD_TRI_OFFSET) ind |= FX_OFFSET; 303 if (flags & (DD_TRI_UNFILLED|DD_TRI_STIPPLE)) ind |= FX_FALLBACK; 324 if (flags & (DD_TRI_UNFILLED|DD_TRI_STIPPLE|DD_TRI_SMOOTH)) { 325 ind |= FX_FALLBACK; 326 #if 0 327 if (flags&DD_TRI_UNFILLED) 328 fprintf(stderr, "Fallback tri unfilled\n"); 329 if (flags&DD_TRI_STIPPLE) 330 fprintf(stderr, "Fallback tri stippled\n"); 331 if (flags&DD_TRI_SMOOTH) 332 fprintf(stderr, "Fallback tri smooth\n"); 333 #endif 334 } 304 335 305 336 fxMesa->render_index |= ind; … … 308 339 309 340 if (ind&FX_FALLBACK) 310 311 } 341 ctx->IndirectTriangles |= DD_TRI_SW_RASTERIZE | DD_QUAD_SW_RASTERIZE; 342 } 312 343 else if (fxMesa->render_index) 313 344 { 314 if (fxMesa->render_index & FX_OFFSET) 315 345 if (fxMesa->render_index & FX_OFFSET) 346 FX_grDepthBiasLevel(0); 316 347 317 348 fxMesa->render_index = 0; … … 333 364 */ 334 365 366 extern int gl_fx_dummy_function_tris(void); 335 367 int gl_fx_dummy_function_tris(void) 336 368 {
Note:
See TracChangeset
for help on using the changeset viewer.