projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b04939
)
gallium: Ensure map ranges are valid.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 4 Mar 2009 16:07:51 +0000
(16:07 +0000)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 4 Mar 2009 16:07:51 +0000
(16:07 +0000)
src/gallium/include/pipe/p_inlines.h
patch
|
blob
|
history
diff --git
a/src/gallium/include/pipe/p_inlines.h
b/src/gallium/include/pipe/p_inlines.h
index 1f46461043e6b8f9d6c780a174fe30db7f1ab21a..4e5252dfbe0ac5b553f379a73c69b0265b9594a9 100644
(file)
--- a/
src/gallium/include/pipe/p_inlines.h
+++ b/
src/gallium/include/pipe/p_inlines.h
@@
-83,6
+83,8
@@
pipe_buffer_map_range(struct pipe_screen *screen,
unsigned length,
unsigned usage)
{
+ assert(offset < buf->size);
+ assert(offset + length <= buf->size);
if(screen->buffer_map_range)
return screen->buffer_map_range(screen, buf, offset, length, usage);
else {
@@
-98,6
+100,8
@@
pipe_buffer_flush_mapped_range(struct pipe_screen *screen,
unsigned offset,
unsigned length)
{
+ assert(offset < buf->size);
+ assert(offset + length <= buf->size);
if(screen->buffer_flush_mapped_range)
screen->buffer_flush_mapped_range(screen, buf, offset, length);
}