~ubuntu-branches/ubuntu/quantal/mesa/quantal

« back to all changes in this revision

Viewing changes to src/mesa/swrast/s_pointtemp.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-02-21 12:44:07 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20070221124407-rgcacs32mycrtadl
ImportĀ upstreamĀ versionĀ 6.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Mesa 3-D graphics library
3
 
 * Version:  6.5
 
3
 * Version:  6.5.2
4
4
 *
5
 
 * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
 
5
 * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
6
6
 *
7
7
 * Permission is hereby granted, free of charge, to any person obtaining a
8
8
 * copy of this software and associated documentation files (the "Software"),
92
92
   GLuint u;
93
93
#endif
94
94
   SWcontext *swrast = SWRAST_CONTEXT(ctx);
95
 
   struct sw_span *span = &(swrast->PointSpan);
 
95
   SWspan *span = &(swrast->PointSpan);
96
96
 
97
97
   /* Cull primitives with malformed coordinates.
98
98
    */
119
119
   span->arrayMask |= SPAN_INDEX;
120
120
#endif
121
121
#if FLAGS & TEXTURE
122
 
   span->arrayMask |= SPAN_TEXTURE;
 
122
   span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA);
123
123
   if (ctx->FragmentProgram._Active) {
124
124
      /* Don't divide texture s,t,r by q (use TXP to do that) */
125
125
      for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
150
150
   span->arrayMask |= SPAN_COVERAGE;
151
151
#endif
152
152
#if FLAGS & SPRITE
153
 
   span->arrayMask |= SPAN_TEXTURE;
 
153
   span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA);
154
154
#endif
155
155
 
156
156
   /* Compute point size if not known to be one */
232
232
      /* check if we need to flush */
233
233
      if (span->end + (xmax-xmin+1) * (ymax-ymin+1) >= MAX_WIDTH ||
234
234
          (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) {
 
235
         if (span->end > 0) {
235
236
#if FLAGS & RGBA
236
 
         _swrast_write_rgba_span(ctx, span);
 
237
            _swrast_write_rgba_span(ctx, span);
237
238
#else
238
 
         _swrast_write_index_span(ctx, span);
 
239
            _swrast_write_index_span(ctx, span);
239
240
#endif
240
 
         span->end = 0;
 
241
            span->end = 0;
 
242
         }
241
243
      }
242
244
 
243
245
      /*
279
281
            for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
280
282
               if (ctx->Texture._EnabledCoordUnits & (1 << u)) {
281
283
                  COPY_4V(span->array->texcoords[u][count], texcoord[u]);
 
284
                  span->array->lambda[u][count] = 0.0;
282
285
               }
283
286
            }
284
287
#endif
343
346
                     span->array->texcoords[u][count][1] = t;
344
347
                     span->array->texcoords[u][count][2] = r;
345
348
                     span->array->texcoords[u][count][3] = 1.0F;
 
349
                     span->array->lambda[u][count] = 0.0; /* XXX fix? */
346
350
                  }
347
351
                  else {
348
352
                     COPY_4V(span->array->texcoords[u][count], vert->texcoord[u]);