From f2a6404ef39b4985788aaf9ec8b540704e5aa92b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 18 Apr 2008 12:12:53 +1000 Subject: [PATCH] i915: check for depth region before accounting its buffer size fd.o bz #15573 --- src/mesa/drivers/dri/i915/i915_vtbl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 5cf74d59061..135bfaa265d 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -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) { -- 2.30.2