Ignore:
Timestamp:
May 23, 2000, 10:41:28 PM (25 years ago)
Author:
jeroen
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/opengl/mesa/3dfx/fxtrifuncs.c

    r2938 r3598  
    33/*
    44 * Mesa 3-D graphics library
    5  * Version:  3.1
     5 * Version:  3.3
    66 *
    77 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
     
    5858
    5959
    60 /* Is this enough?  Do we need more triangle funcs? 
     60/* Is this enough?  Do we need more triangle funcs?
    6161 */
    6262static triangle_func tri_tab[0x40];  /* only 0x20 actually used */
     
    129129#include "fxtritmp.h"
    130130
     131/* We don't actually do antialiasing correctly. Geometry has to be
     132   sorted for glide's antialiasing to operate */
     133#if 0
    131134#define IND (FX_ANTIALIAS)
    132135#define TAG(x) x##_aa
     
    192195#define TAG(x) x##_aa_flat_front_back_twoside_offset
    193196#include "fxtritmp.h"
    194 
    195 
    196 void fxDDTrifuncInit() 
     197#endif
     198
     199void fxDDTrifuncInit()
    197200{
    198201   init();
     
    212215   init_flat_front_back_twoside();
    213216   init_flat_front_back_twoside_offset();
     217#if 0
    214218   init_aa();
    215219   init_aa_offset();
     
    228232   init_aa_flat_front_back_twoside();
    229233   init_aa_flat_front_back_twoside_offset();
     234#endif
    230235}
    231236
     
    233238{
    234239   fprintf(stderr, "%s: (%x) %s%s%s%s%s%s\n",
    235            msg, state,
    236            (state & FX_ANTIALIAS)  ? "antialias, "  : "",
    237            (state & FX_FLAT)       ? "flat, "       : "",
    238            (state & FX_TWOSIDE)    ? "twoside, "    : "",
    239            (state & FX_OFFSET)     ? "offset, "     : "",
    240            (state & FX_FRONT_BACK) ? "front-back, " : "",
    241            (state & FX_FALLBACK)    ? "fallback"     : "");
     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"     : "");
    242247}
    243248
     
    246251{
    247252   fprintf(stderr, "%s: (%x) %s %s%s %s%s\n",
    248            msg, state,
    249            (state & GR_STWHINT_W_DIFF_FBI)    ? "w-fbi, "   : "",
    250            (state & GR_STWHINT_W_DIFF_TMU0)   ? "w-tmu0, "  : "",
    251            (state & GR_STWHINT_ST_DIFF_TMU0)  ? "st-tmu0, " : "",
    252            (state & GR_STWHINT_W_DIFF_TMU1)   ? "w-tmu1, "  : "",
    253            (state & GR_STWHINT_ST_DIFF_TMU1)  ? "st-tmu1, " : "");
     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, " : "");
    254259
    255260}
     
    265270
    266271   if (flags) {
    267       if (fxMesa->render_index & FX_OFFSET) 
    268         FX_grDepthBiasLevel(0);
     272      if (fxMesa->render_index & FX_OFFSET)
     273        FX_grDepthBiasLevel(0);
    269274
    270275      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;
    278286      }
    279    
     287
    280288      if (flags & DD_FLATSHADE)                    ind |= FX_FLAT;
    281289      if (flags & DD_TRI_LIGHT_TWOSIDE)            ind |= FX_TWOSIDE;
    282290      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      }
    285300
    286301      fxMesa->render_index = ind;
    287302      fxMesa->PointsFunc = points_tab[ind];
    288303      if (ind&FX_FALLBACK)
    289         ctx->IndirectTriangles |= DD_POINT_SW_RASTERIZE;
     304        ctx->IndirectTriangles |= DD_POINT_SW_RASTERIZE;
    290305      ind &= ~(FX_ANTIALIAS|FX_FALLBACK);
    291306
    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      }
    294316
    295317      fxMesa->render_index |= ind;
    296318      fxMesa->LineFunc = line_tab[ind];
    297319      if (ind&FX_FALLBACK)
    298         ctx->IndirectTriangles |= DD_LINE_SW_RASTERIZE;
     320        ctx->IndirectTriangles |= DD_LINE_SW_RASTERIZE;
    299321      ind &= ~(FX_ANTIALIAS|FX_FALLBACK);
    300322
    301       if (flags & DD_TRI_SMOOTH)                    ind |= FX_ANTIALIAS;
    302323      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      }
    304335
    305336      fxMesa->render_index |= ind;
     
    308339
    309340      if (ind&FX_FALLBACK)
    310         ctx->IndirectTriangles |= DD_TRI_SW_RASTERIZE | DD_QUAD_SW_RASTERIZE;
    311    } 
     341        ctx->IndirectTriangles |= DD_TRI_SW_RASTERIZE | DD_QUAD_SW_RASTERIZE;
     342   }
    312343   else if (fxMesa->render_index)
    313344   {
    314       if (fxMesa->render_index & FX_OFFSET) 
    315         FX_grDepthBiasLevel(0);
     345      if (fxMesa->render_index & FX_OFFSET)
     346        FX_grDepthBiasLevel(0);
    316347
    317348      fxMesa->render_index = 0;
     
    333364 */
    334365
     366extern int gl_fx_dummy_function_tris(void);
    335367int gl_fx_dummy_function_tris(void)
    336368{
Note: See TracChangeset for help on using the changeset viewer.