projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
815de0a
)
pipebuffer: More assertions.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 28 Jan 2009 15:53:21 +0000
(15:53 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 28 Jan 2009 15:54:13 +0000
(15:54 +0000)
src/gallium/auxiliary/pipebuffer/pb_buffer.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/pipebuffer/pb_buffer.h
b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
index a4650e469fb3a5509307afd4e91864c59b418d8d..fb0ba1594850c4cc73b62854afdbd67e8a66474c 100644
(file)
--- a/
src/gallium/auxiliary/pipebuffer/pb_buffer.h
+++ b/
src/gallium/auxiliary/pipebuffer/pb_buffer.h
@@
-148,6
+148,7
@@
pb_map(struct pb_buffer *buf,
assert(buf);
if(!buf)
return NULL;
+ assert(buf->base.refcount > 0);
return buf->vtbl->map(buf, flags);
}
@@
-158,6
+159,7
@@
pb_unmap(struct pb_buffer *buf)
assert(buf);
if(!buf)
return;
+ assert(buf->base.refcount > 0);
buf->vtbl->unmap(buf);
}
@@
-173,7
+175,10
@@
pb_get_base_buffer( struct pb_buffer *buf,
offset = 0;
return;
}
+ assert(buf->base.refcount > 0);
buf->vtbl->get_base_buffer(buf, base_buf, offset);
+ assert(*base_buf);
+ assert(*offset < (*base_buf)->base.size);
}