i965: Add support for non-color render target write data to new FS backend.
[mesa.git] / src / mesa / drivers / dri / mga / mgapixel.c
index 05b30ba61e2b0fe9c05f7d9ed88023c83da458d7..9cbdbe02c942941f2c35a417ee398c354714096a 100644 (file)
@@ -55,7 +55,6 @@
      (((unsigned long)p) - (unsigned long)mmesa->mgaScreen->buffers.map)
 
 
-#if defined(MESA_packed_depth_stencil)
 static GLboolean
 check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
                          const struct gl_pixelstore_attrib *packing,
@@ -64,7 +63,7 @@ check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
 {
    mgaContextPtr mmesa = MGA_CONTEXT(ctx);
 
-   return ( type == GL_UNSIGNED_INT_24_8_MESA &&
+   return ( type == GL_UNSIGNED_INT_24_8 &&
            ctx->Visual->DepthBits == 24 &&
            ctx->Visual->StencilBits == 8 &&
            mmesa->mgaScreen->cpp == 4 &&
@@ -78,7 +77,6 @@ check_depth_stencil_24_8( const GLcontext *ctx, GLenum type,
            pitch % 32 == 0 &&
            pitch < 4096 );
 }
-#endif
 
 
 static GLboolean
@@ -252,13 +250,11 @@ mgaTryReadPixels( GLcontext *ctx,
       return GL_FALSE;
 
    switch (format) {
-#if defined(MESA_packed_depth_stencil)
-   case GL_DEPTH_STENCIL_MESA:
+   case GL_DEPTH_STENCIL:
       ok = check_depth_stencil_24_8(ctx, type, pack, pixels, size, pitch);
       planemask = ~0;
       source = mmesa->mgaScreen->depthOffset;
       break;
-#endif
 
    case GL_DEPTH_COMPONENT:
       ok = check_depth(ctx, type, pack, pixels, size, pitch);
@@ -299,7 +295,7 @@ mgaTryReadPixels( GLcontext *ctx,
 
 #if 0
    {
-      __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+      __DRIdrawable *dPriv = mmesa->driDrawable;
       int nbox, retcode, i;
 
       UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT );
@@ -399,7 +395,7 @@ static void do_draw_pix( GLcontext *ctx,
 #if 0
    mgaContextPtr mmesa = MGA_CONTEXT(ctx);
    drmMGABlit blit;
-   __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+   __DRIdrawable *dPriv = mmesa->driDrawable;
    drm_clip_rect_t pbox = dPriv->pClipRects;
    int nbox = dPriv->numClipRects;
    int retcode, i;
@@ -494,8 +490,7 @@ mgaTryDrawPixels( GLcontext *ctx,
 
 
    switch (format) {
-#if defined(MESA_packed_depth_stencil)
-   case GL_DEPTH_STENCIL_MESA:
+   case GL_DEPTH_STENCIL:
       dest = mmesa->mgaScreen->depthOffset;
       planemask = ~0;
       if (!check_depth_stencil_24_8(ctx, type, unpack, pixels, size, pitch) ||
@@ -503,7 +498,6 @@ mgaTryDrawPixels( GLcontext *ctx,
          !check_stencil_per_fragment_ops(ctx))
         return GL_FALSE;
       break;
-#endif
 
    case GL_DEPTH_COMPONENT:
       dest = mmesa->mgaScreen->depthOffset;
@@ -600,7 +594,7 @@ mgaTryDrawPixels( GLcontext *ctx,
            }
         }
 #else
-        MEMCPY( address, pixels, rows*bufferpitch );
+        memcpy( address, pixels, rows*bufferpitch );
 #endif
 
         do_draw_pix( ctx, x, y, width, rows,