i915: Detect allocation failure of batch buffer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2011-03-10 18:01:32 +00:00
parent 8cbdfe1de4
commit b094dff50a
+4
View File
@@ -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);