summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-08 16:11:17 -0600
committerBrian Paul <[email protected]>2009-06-08 16:11:17 -0600
commit34bb024cf2d02d5d5cb672ead05fa131bdff6dd8 (patch)
tree7abe44d048a82efee53d3aacb0074d1fd06305fa
parent7eed6ab5b525b75f690d05042c90d05827253114 (diff)
st/mesa: fix incorrect bufObj Length assignment, remove unneeded assertion
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index a94e11fff12..fbe6aa25de6 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -251,7 +251,7 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
map = obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags);
if(obj->Pointer) {
obj->Offset = 0;
- obj->Length = obj->Size;
+ obj->Length = length;
map += offset;
}
@@ -270,7 +270,6 @@ st_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target,
/* Subrange is relative to mapped range */
assert(offset >= 0);
assert(length >= 0);
- assert(offset < obj->Length);
assert(offset + length <= obj->Length);
pipe_buffer_flush_mapped_range(pipe->screen, st_obj->buffer,