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

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/tdfx/tdfx_span.c

  • 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:
47
47
 
48
48
 
49
49
#define LOCAL_VARS                                                      \
50
 
   __DRIdrawablePrivate *dPriv = fxMesa->driDrawable;                   \
51
 
   tdfxScreenPrivate *fxPriv = fxMesa->fxScreen;                        \
52
 
   GLboolean isFront = (ctx->DrawBuffer->_ColorDrawBufferMask[0]        \
53
 
                      == BUFFER_BIT_FRONT_LEFT);                        \
54
 
   GLuint pitch = isFront ? (fxMesa->screen_width * BYTESPERPIXEL)      \
55
 
                          : info.strideInBytes;                         \
56
 
   GLuint height = fxMesa->height;                                      \
 
50
   driRenderbuffer *drb = (driRenderbuffer *) rb;                       \
 
51
   __DRIdrawablePrivate *const dPriv = drb->dPriv;                      \
 
52
   GLuint pitch = drb->backBuffer ? info.strideInBytes                  \
 
53
     : (drb->pitch * drb->cpp);                                         \
 
54
   const GLuint bottom = dPriv->h - 1;                                  \
57
55
   char *buf = (char *)((char *)info.lfbPtr +                           \
58
 
                         dPriv->x * fxPriv->cpp +                       \
59
 
                         dPriv->y * pitch);                             \
 
56
                         (dPriv->x * drb->cpp) +                        \
 
57
                         (dPriv->y * pitch));                           \
60
58
   GLuint p;                                                            \
61
59
   (void) buf; (void) p;
62
60
 
63
61
 
64
 
#define Y_FLIP(_y)              (height - _y - 1)
 
62
#define Y_FLIP(_y)              (bottom - _y)
65
63
 
66
64
 
67
65
#define HW_WRITE_LOCK()                                                 \
71
69
   UNLOCK_HARDWARE( fxMesa );                                           \
72
70
   LOCK_HARDWARE( fxMesa );                                             \
73
71
   info.size = sizeof(GrLfbInfo_t);                                     \
74
 
   if ( fxMesa->Glide.grLfbLock( GR_LFB_WRITE_ONLY,                     \
75
 
                   fxMesa->DrawBuffer, LFB_MODE,                        \
76
 
                   GR_ORIGIN_UPPER_LEFT, FXFALSE, &info ) )             \
77
 
   {
 
72
   if (fxMesa->Glide.grLfbLock(GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer,   \
 
73
                               LFB_MODE, GR_ORIGIN_UPPER_LEFT, FXFALSE, \
 
74
                               &info)) {
78
75
 
79
76
#define HW_WRITE_UNLOCK()                                               \
80
77
      fxMesa->Glide.grLfbUnlock( GR_LFB_WRITE_ONLY, fxMesa->DrawBuffer );\
976
973
         GetFbParams(fxMesa, &info, &backBufferInfo,
977
974
                     &ReadParams, sizeof(GLushort));
978
975
         for (i = 0; i < n; i++) {
979
 
            if (mask[i] && visible_pixel(fxMesa, x[i], y[i])) {
 
976
            if ((!mask || mask[i]) && visible_pixel(fxMesa, x[i], y[i])) {
980
977
               xpos = x[i] + fxMesa->x_offset;
981
978
               ypos = bottom - y[i];
982
979
               d16 = depth[i];
1000
997
         GetFbParams(fxMesa, &info, &backBufferInfo,
1001
998
                     &ReadParams, sizeof(GLuint));
1002
999
         for (i = 0; i < n; i++) {
1003
 
            if (mask[i]) {
 
1000
            if (!mask || mask[i]) {
1004
1001
               if (visible_pixel(fxMesa, x[i], y[i])) {
1005
1002
                  xpos = x[i] + fxMesa->x_offset;
1006
1003
                  ypos = bottom - y[i];