summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-05 17:04:27 -0700
committerBrian Paul <[email protected]>2009-03-05 17:25:25 -0700
commitee41bb2ed01b9480e5370d67257334b81ec0c90e (patch)
treed71b2aa95f9c0f96f8fbbe0f70941fcb90bc6bb8 /src
parent20f49252e1fe2e72bb620c26292f33d5315452a1 (diff)
i965: fix screen depth test in intel_validate_framebuffer)_
front_region may be null.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 787c2900221..a401f730ba2 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -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;