fix up radeon span functions using latest r200 code from Brian,
[mesa.git] / src / mesa / drivers / dri / i915 / intel_pixel.c
index d842273a80d7a6fb9e82c91ba673efabddc270d2..a79bed45fbe80d9e036fd3b3b2132c7912675971 100644 (file)
@@ -86,8 +86,7 @@ check_color_per_fragment_ops( const GLcontext *ctx )
                    !ctx->Color.ColorMask[2] ||
                    !ctx->Color.ColorMask[3] ||
                    ctx->Color.ColorLogicOpEnabled ||
-                   ctx->Texture._EnabledUnits ||
-                   ctx->Depth.OcclusionTest
+                   ctx->Texture._EnabledUnits
            ) &&
           ctx->Current.RasterPosValid);
    
@@ -131,7 +130,7 @@ clip_pixelrect( const GLcontext *ctx,
    if (*height <= 0)
       return GL_FALSE;
 
-   *size = ((*y + *height - 1) * intel->intelScreen->frontPitch +
+   *size = ((*y + *height - 1) * intel->intelScreen->front.pitch +
            (*x + *width - 1) * intel->intelScreen->cpp);
 
    return GL_TRUE;
@@ -194,7 +193,7 @@ intelTryReadPixels( GLcontext *ctx,
       __DRIdrawablePrivate *dPriv = intel->driDrawable;
       int nbox = dPriv->numClipRects;
       int src_offset = intel->drawOffset;
-      int src_pitch = intel->intelScreen->frontPitch;
+      int src_pitch = intel->intelScreen->front.pitch;
       int dst_offset = intelAgpOffsetFromVirtual( intel, pixels);
       drm_clip_rect_t *box = dPriv->pClipRects;
       int i;
@@ -286,6 +285,7 @@ static void do_draw_pix( GLcontext *ctx,
 
    intelFlush( &intel->ctx );
    LOCK_HARDWARE( intel );
+   if (ctx->DrawBuffer)
    {
       y -= height;                     /* cope with pixel zoom */
    
@@ -318,7 +318,7 @@ static void do_draw_pix( GLcontext *ctx,
         intelEmitCopyBlitLocked( intel,
                            intel->intelScreen->cpp,
                            src_pitch, src_offset,
-                           intel->intelScreen->frontPitch,
+                           intel->intelScreen->front.pitch,
                              intel->drawOffset,
                            bx - x, by - y,
                            bx, by,