i965: fix screen depth test in intel_validate_framebuffer)_
authorBrian Paul <brianp@vmware.com>
Fri, 6 Mar 2009 00:04:27 +0000 (17:04 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 6 Mar 2009 00:25:25 +0000 (17:25 -0700)
front_region may be null.

src/mesa/drivers/dri/intel/intel_fbo.c

index 787c290022117af8bb582a018058b6a0476bc7aa..a401f730ba219c71656d65f86148ba163a546a08 100644 (file)
@@ -653,7 +653,8 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
        * screen depth.  There currently seems to be a problem when
        * rendering into a rgb565 texture when the screen is abgr8888.
        */
-      if (intel->front_region->cpp == 4)
+
+      if (intel->ctx.Visual.rgbBits >= 24)
          supportedFormat = &_mesa_texformat_argb8888;
       else 
          supportedFormat = &_mesa_texformat_rgb565;