i915: check for depth region before accounting its buffer size
authorDave Airlie <airlied@redhat.com>
Fri, 18 Apr 2008 02:12:53 +0000 (12:12 +1000)
committerDave Airlie <airlied@panoply-rh.(none)>
Fri, 18 Apr 2008 02:13:13 +0000 (12:13 +1000)
fd.o bz #15573

src/mesa/drivers/dri/i915/i915_vtbl.c

index 5cf74d59061a2220ac64243982bd44ecaf37328e..135bfaa265db847aaf45b1e54f501b12d5db8f01 100644 (file)
@@ -322,7 +322,8 @@ i915_emit_state(struct intel_context *intel)
    ret = 0;
    if (dirty & I915_UPLOAD_BUFFERS) {
      ret |= dri_bufmgr_check_aperture_space(state->draw_region->buffer);
-     ret |= dri_bufmgr_check_aperture_space(state->depth_region->buffer);
+     if (state->depth_region)
+        ret |= dri_bufmgr_check_aperture_space(state->depth_region->buffer);
    }
 
    if (dirty & I915_UPLOAD_TEX_ALL) {