summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-09-03 14:47:36 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2008-09-03 14:47:36 +0800
commit3bb2a24921af0ec419afc928ee5b279982aa01ea (patch)
tree29361b106b5baa80c3205fd8042662aac9ba68e8
parent0fd1a8c4a1201f3508cb6a98dc1c66ab9ebd919f (diff)
intel: Fix a crash if dri2 is disabled.
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c16
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 f0ee96f18d..2975e4c0f0 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