FatalError on batchbuffer map failure

Yes, it would be nice to do something other than crash here.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2008-12-15 15:49:01 -08:00
parent 632f816c72
commit 7736b65be4
1 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,9 @@ intel_next_batch(ScrnInfoPtr pScrn)
else
pI830->batch_bo = dri_bo_alloc(pI830->bufmgr, "batch", 4096 * 4, 4096);
dri_bo_map(pI830->batch_bo, 1);
if (dri_bo_map(pI830->batch_bo, 1) != 0)
FatalError("Failed to map batchbuffer: %s\n", strerror(errno));
pI830->batch_used = 0;
pI830->batch_ptr = pI830->batch_bo->virtual;
}