gallium: check for PIPE_FORMAT_X8Z24_UNORM format
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Apr 2008 15:40:26 +0000 (09:40 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Apr 2008 15:40:26 +0000 (09:40 -0600)
src/mesa/state_tracker/st_cb_readpixels.c

index 1fef55b8443584e15a75347f6914a34ead0cbc32..ddbe36106c86367c4478eeb59b7c5073f71b662d 100644 (file)
@@ -240,7 +240,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
       const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
                                                      format, type);
 
-      if (strb->surface->format == PIPE_FORMAT_S8Z24_UNORM) {
+      if (strb->surface->format == PIPE_FORMAT_S8Z24_UNORM ||
+          strb->surface->format == PIPE_FORMAT_X8Z24_UNORM) {
          if (format == GL_DEPTH_COMPONENT) {
             for (i = 0; i < height; i++) {
                GLuint ztemp[MAX_WIDTH], j;