Mesa (master): i915: Detect allocation failure of batch buffer
Chris Wilson
ickle at kemper.freedesktop.org
Tue Mar 29 14:44:54 UTC 2011
Module: Mesa
Branch: master
Commit: b094dff50a05e56f5415d31daa5e4542f321c858
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b094dff50a05e56f5415d31daa5e4542f321c858
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Mar 10 18:01:32 2011 +0000
i915: Detect allocation failure of batch buffer
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
src/mesa/drivers/dri/i915/i915_vtbl.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 921183b..942ebec 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -307,6 +307,10 @@ i915_emit_state(struct intel_context *intel)
false);
count = 0;
again:
+ if (intel->batch.bo == NULL) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "i915 emit state");
+ assert(0);
+ }
aper_count = 0;
dirty = get_dirty(state);
More information about the mesa-commit
mailing list