r200: handle Z24 depth buffers correctly
authorDave Airlie <airlied@redhat.com>
Tue, 6 Dec 2011 14:03:55 +0000 (14:03 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 6 Dec 2011 15:11:36 +0000 (15:11 +0000)
The same detiling pattern applies to X8_Z24 as well.

Signed-off-by: Dave Airlie <Airlied@redhat.com>
src/mesa/drivers/dri/radeon/radeon_fbo.c

index 4dd523f0e34eaade12f99aa76df990f9b6c1a091..31203cc1d5c34abc047110ae00b501007bde4f67 100644 (file)
@@ -214,7 +214,7 @@ radeon_map_renderbuffer(struct gl_context *ctx,
    }
 
 #if defined(RADEON_R200)
-   if (rb->Format == MESA_FORMAT_S8_Z24 && !rrb->has_surface) {
+   if ((rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) && !rrb->has_surface) {
      radeon_map_renderbuffer_s8z24(ctx, rb, x, y, w, h,
                                   mode, out_map, out_stride);
      return;
@@ -286,7 +286,7 @@ radeon_unmap_renderbuffer(struct gl_context *ctx,
    GLboolean ok;
 
 #ifdef RADEON_R200
-   if (rb->Format == MESA_FORMAT_S8_Z24 && !rrb->has_surface) {
+   if ((rb->Format == MESA_FORMAT_S8_Z24 || rb->Format == MESA_FORMAT_X8_Z24) && !rrb->has_surface) {
        radeon_unmap_renderbuffer_s8z24(ctx, rb);
        return;
    }