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

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/sis/sis_clear.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:
95
95
}
96
96
 
97
97
void
98
 
sisDDClear( GLcontext * ctx, GLbitfield mask, GLboolean all,
99
 
            GLint x, GLint y, GLint width, GLint height )
 
98
sisDDClear( GLcontext * ctx, GLbitfield mask )
100
99
{
101
 
  sisContextPtr smesa = SIS_CONTEXT(ctx);
102
 
 
103
 
  GLint x1, y1, width1, height1;
104
 
 
105
 
   if (all) {
106
 
      GLframebuffer *buffer = ctx->DrawBuffer;
107
 
 
108
 
      x1 = 0;
109
 
      y1 = 0;
110
 
      width1 = buffer->Width;
111
 
      height1 = buffer->Height;
112
 
   } else {
113
 
      x1 = x;
114
 
      y1 = Y_FLIP(y+height-1);
115
 
      width1 = width;            
116
 
      height1 = height;
117
 
   }
118
 
   /* XXX: Scissoring */
 
100
   sisContextPtr smesa = SIS_CONTEXT(ctx);
 
101
 
 
102
   GLint x1, y1, width1, height1;
 
103
 
 
104
   /* get region after locking: */
 
105
   x1 = ctx->DrawBuffer->_Xmin;
 
106
   y1 = ctx->DrawBuffer->_Ymin;
 
107
   width1 = ctx->DrawBuffer->_Xmax - x1;
 
108
   height1 = ctx->DrawBuffer->_Ymax - y1;
 
109
   y1 = Y_FLIP(y1 + height1 - 1);
119
110
 
120
111
   /* Mask out any non-existent buffers */
121
112
   if (ctx->Visual.depthBits == 0 || !ctx->Depth.Mask)
153
144
   UNLOCK_HARDWARE();
154
145
 
155
146
   if (mask != 0)
156
 
      _swrast_Clear( ctx, mask, all, x1, y1, width, height );
 
147
      _swrast_Clear( ctx, mask);
157
148
}
158
149
 
159
150
 
337
328
                        GLint width, GLint height )
338
329
{
339
330
   sisContextPtr smesa = SIS_CONTEXT(ctx);
340
 
 
341
331
   int count;
342
 
   GLuint depth = smesa->bytesPerPixel;
343
332
   drm_clip_rect_t *pExtents = NULL;
344
333
   GLint xx, yy;
345
334
   GLint x0, y0, width0, height0;
387
376
      if (width <= 0 || height <= 0)
388
377
        continue;
389
378
 
390
 
      int cmd;
391
 
 
392
379
      mWait3DCmdQueue (8);
393
380
      MMIO(REG_SRC_PITCH, (smesa->bytesPerPixel == 4) ? 
394
381
                           BLIT_DEPTH_32 : BLIT_DEPTH_16);