These functions may be called from the VBO code (not just user GL calls)
so do some parameter sanity checking.
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
+ /* we may be called from VBO code, so double-check params here */
+ ASSERT(offset >= 0);
+ ASSERT(size >= 0);
+ ASSERT(offset + size <= obj->Size);
+
st_cond_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer,
offset, size, data);
}
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
+ /* we may be called from VBO code, so double-check params here */
+ ASSERT(offset >= 0);
+ ASSERT(size >= 0);
+ ASSERT(offset + size <= obj->Size);
+
st_cond_flush_pipe_buffer_read(st_context(ctx), st_obj->buffer,
offset, size, data);
}