i965: fix screen depth test in intel_validate_framebuffer)_

front_region may be null.
This commit is contained in:
Brian Paul 2009-03-05 17:04:27 -07:00
parent 20f49252e1
commit ee41bb2ed0

View 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;