diff options
author | Xiang, Haihao <[email protected]> | 2008-09-03 14:47:36 +0800 |
---|---|---|
committer | Xiang, Haihao <[email protected]> | 2008-09-03 14:47:36 +0800 |
commit | 3bb2a24921af0ec419afc928ee5b279982aa01ea (patch) | |
tree | 29361b106b5baa80c3205fd8042662aac9ba68e8 /src/mesa/drivers | |
parent | 0fd1a8c4a1201f3508cb6a98dc1c66ab9ebd919f (diff) |
intel: Fix a crash if dri2 is disabled.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index f0ee96f18da..2975e4c0f09 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -921,14 +921,14 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, struct intel_framebuffer *intel_fb = (struct intel_framebuffer *) driDrawPriv->driverPrivate; GLframebuffer *readFb = (GLframebuffer *) driReadPriv->driverPrivate; - - intel_update_renderbuffers(driContextPriv, driDrawPriv); - if (driDrawPriv != driReadPriv) - intel_update_renderbuffers(driContextPriv, driReadPriv); - - /* XXX FBO temporary fix-ups! */ - /* if the renderbuffers don't have regions, init them from the context */ - if (!driContextPriv->driScreenPriv->dri2.enabled) { + + if (driContextPriv->driScreenPriv->dri2.enabled) { + intel_update_renderbuffers(driContextPriv, driDrawPriv); + if (driDrawPriv != driReadPriv) + intel_update_renderbuffers(driContextPriv, driReadPriv); + } else { + /* XXX FBO temporary fix-ups! */ + /* if the renderbuffers don't have regions, init them from the context */ struct intel_renderbuffer *irbDepth = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH); struct intel_renderbuffer *irbStencil |