summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-03-21 20:02:37 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-03-21 20:02:37 +0000
commit9caacb015a4e999e25bffb282238d488a992d405 (patch)
treece2cb24e706bad5e94e0e59aaeee37fb8883ae36
parent28877705340da423df1bd74865ba1db9750c2271 (diff)
Add a few assertions, currently hit by fgl_glxgears
-rw-r--r--src/mesa/drivers/dri/i915/intel_bufmgr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_bufmgr.c b/src/mesa/drivers/dri/i915/intel_bufmgr.c
index 9c0b04897b..3a41aefe1c 100644
--- a/src/mesa/drivers/dri/i915/intel_bufmgr.c
+++ b/src/mesa/drivers/dri/i915/intel_bufmgr.c
@@ -163,6 +163,8 @@ bmSetShared(struct bufmgr *bm, unsigned buffer, unsigned flags,
{
drmMMBuf *buf = _mesa_HashLookup(bm->hash, buffer);
+ assert(buf);
+
buf->flags = DRM_MM_NO_EVICT | DRM_MM_SHARED
| DRM_MM_WRITE | DRM_MM_READ;
buf->flags |= flags & DRM_MM_MEMTYPE_MASK;
@@ -207,6 +209,7 @@ bmBufferData(struct bufmgr *bm,
DBG("bmBufferData %d sz 0x%x data: %p\n", buffer, size, data);
+ assert(buf);
assert(!buf->mapped);
if (buf->flags & BM_BATCHBUFFER) {
@@ -247,6 +250,7 @@ bmBufferSubData(struct bufmgr *bm,
DBG("bmBufferSubdata %d offset 0x%x sz 0x%x\n", buffer, offset, size);
+ assert(buf);
drmBufWaitBusy(bm->driFd, buf);
if (size) {
@@ -270,6 +274,7 @@ bmBufferGetSubData(struct bufmgr *bm,
DBG("bmBufferSubdata %d offset 0x%x sz 0x%x\n", buffer, offset, size);
+ assert(buf);
drmBufWaitBusy(bm->driFd, buf);
if (size) {
@@ -294,6 +299,7 @@ bmMapBuffer(struct bufmgr *bm, unsigned buffer, unsigned flags)
DBG("bmMapBuffer %d\n", buffer);
DBG("Map: Block is 0x%x\n", &buf->block);
+ assert(buf);
/* assert(!buf->mapped); */
retval = drmMMMapBuffer(bm->driFd, buf);
}
@@ -342,6 +348,7 @@ bmAddBuffer(struct bufmgr *bm,
{
drmMMBuf *buf = (drmMMBuf *) _mesa_HashLookup(bm->hash, buffer);
+ assert(buf);
return drmMMBufListAdd(list, buf, 0, flags, memtype_return, offset_return);
}
@@ -357,6 +364,7 @@ bmScanBufferList(struct bufmgr *bm,
{
drmMMBuf *buf = (drmMMBuf *) _mesa_HashLookup(bm->hash, buffer);
+ assert(buf);
return drmMMScanBufList(list, buf);
}