Merge remote branch 'origin/mesa_7_6_branch'
[mesa.git] / src / mesa / drivers / dri / r200 / r200_pixel.c
index 654f2c6ae986778aeb37c9a1597fbfc729828c26..95773871e025bed2c3652d1c5ce285d43770f281 100644 (file)
@@ -53,14 +53,14 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
    r200ContextPtr rmesa = R200_CONTEXT(ctx);
    GLuint cpp = rmesa->radeon.radeonScreen->cpp;
 
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    if (        (pitch & 63) ||
        ctx->_ImageTransferState ||
        packing->SwapBytes ||
        packing->LsbFirst) {
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "%s: failed 1\n", __FUNCTION__);
       return GL_FALSE;
    }
@@ -68,12 +68,12 @@ check_color( const GLcontext *ctx, GLenum type, GLenum format,
    if ( type == GL_UNSIGNED_INT_8_8_8_8_REV &&
        cpp == 4 &&
        format == GL_BGRA ) {
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "%s: passed 2\n", __FUNCTION__);
       return GL_TRUE;
    }
 
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s: failed\n", __FUNCTION__);
 
    return GL_FALSE;
@@ -101,7 +101,7 @@ check_color_per_fragment_ops( const GLcontext *ctx )
 }
 
 
-
+#if 0
 static GLboolean
 clip_pixelrect( const GLcontext *ctx,
                const GLframebuffer *buffer,
@@ -142,6 +142,7 @@ clip_pixelrect( const GLcontext *ctx,
 
    return GL_TRUE;
 }
+#endif
 
 static GLboolean
 r200TryReadPixels( GLcontext *ctx,
@@ -150,22 +151,22 @@ r200TryReadPixels( GLcontext *ctx,
                  const struct gl_pixelstore_attrib *pack,
                  GLvoid *pixels )
 {
+   return GL_FALSE;
+#if 0
    r200ContextPtr rmesa = R200_CONTEXT(ctx);
    GLint pitch = pack->RowLength ? pack->RowLength : width;
    GLint blit_format;
    GLuint cpp = rmesa->radeon.radeonScreen->cpp;
    GLint size = width * height * cpp;
 
-   return GL_FALSE;
-#if 0
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    /* Only accelerate reading to GART buffers.
     */
    if ( !r200IsGartMemory(rmesa, pixels,
                         pitch * height * rmesa->radeon.radeonScreen->cpp ) ) {
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "%s: dest not GART\n", __FUNCTION__);
    }
 
@@ -173,7 +174,7 @@ r200TryReadPixels( GLcontext *ctx,
     * blitter:
     */
    if (!pack->Invert) {
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "%s: MESA_PACK_INVERT not set\n", __FUNCTION__);
       return GL_FALSE;
    }
@@ -206,7 +207,7 @@ r200TryReadPixels( GLcontext *ctx,
    if (!clip_pixelrect(ctx, ctx->ReadBuffer, &x, &y, &width, &height,
                       &size)) {
       UNLOCK_HARDWARE( &rmesa->radeon );
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "%s totally clipped -- nothing to do\n",
                 __FUNCTION__);
       return GL_TRUE;
@@ -231,7 +232,7 @@ r200TryReadPixels( GLcontext *ctx,
       y += dPriv->y;
 
 
-      if (R200_DEBUG & DEBUG_PIXEL)
+      if (R200_DEBUG & RADEON_PIXEL)
         fprintf(stderr, "readpixel blit src_pitch %d dst_pitch %d\n",
                 src_pitch, dst_pitch);
 
@@ -274,7 +275,7 @@ r200ReadPixels( GLcontext *ctx,
                 const struct gl_pixelstore_attrib *pack,
                 GLvoid *pixels )
 {
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    if (!r200TryReadPixels( ctx, x, y, width, height, format, type, pack,
@@ -292,6 +293,10 @@ static void do_draw_pix( GLcontext *ctx,
                         const void *pixels,
                         GLuint planemask)
 {
+   if (R200_DEBUG & RADEON_PIXEL)
+      fprintf(stderr, "%s\n", __FUNCTION__);
+
+#if 0
    r200ContextPtr rmesa = R200_CONTEXT(ctx);
    __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
    drm_clip_rect_t *box = dPriv->pClipRects;
@@ -304,9 +309,6 @@ static void do_draw_pix( GLcontext *ctx,
    int src_offset = r200GartOffsetFromVirtual( rmesa, pixels );
    int src_pitch = pitch * rmesa->radeon.radeonScreen->cpp;
 
-   if (R200_DEBUG & DEBUG_PIXEL)
-      fprintf(stderr, "%s\n", __FUNCTION__);
-#if 0
    switch ( rmesa->radeon.radeonScreen->cpp ) {
    case 2:
       blit_format = R200_CP_COLOR_FORMAT_RGB565;
@@ -386,7 +388,7 @@ r200TryDrawPixels( GLcontext *ctx,
    GLuint cpp = rmesa->radeon.radeonScreen->cpp;
    GLint size = height * pitch * cpp;
 
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    /* check that we're drawing to exactly one color buffer */
@@ -412,7 +414,7 @@ r200TryDrawPixels( GLcontext *ctx,
       /* Can't do conversions on GART reads/draws.
        */
       if ( !r200IsGartMemory( rmesa, pixels, size ) ) {
-        if (R200_DEBUG & DEBUG_PIXEL)
+        if (R200_DEBUG & RADEON_PIXEL)
            fprintf(stderr, "%s: not GART memory\n", __FUNCTION__);
         return GL_FALSE;
       }
@@ -455,7 +457,7 @@ r200DrawPixels( GLcontext *ctx,
                 const struct gl_pixelstore_attrib *unpack,
                 const GLvoid *pixels )
 {
-   if (R200_DEBUG & DEBUG_PIXEL)
+   if (R200_DEBUG & RADEON_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    if (!r200TryDrawPixels( ctx, x, y, width, height, format, type,