st/mesa: remove redundant st_buffer_object::size field and error checks

Just use the gl_buffer_object::Size field.  Remove unnecessary size/offset
error checks.  Core Mesa will have already done these checks before these
functions are called.
This commit is contained in:
Brian Paul
2009-06-19 12:19:15 -06:00
parent 1ffd074436
commit 9d029e0e20
2 changed files with 0 additions and 9 deletions

View File

@@ -98,9 +98,6 @@ st_bufferobj_subdata(GLcontext *ctx,
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
if (offset >= st_obj->size || size > (st_obj->size - offset))
return;
st_cond_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer,
offset, size, data);
}
@@ -118,9 +115,6 @@ st_bufferobj_get_subdata(GLcontext *ctx,
{
struct st_buffer_object *st_obj = st_buffer_object(obj);
if (offset >= st_obj->size || size > (st_obj->size - offset))
return;
st_cond_flush_pipe_buffer_read(st_context(ctx), st_obj->buffer,
offset, size, data);
}
@@ -172,8 +166,6 @@ st_bufferobj_data(GLcontext *ctx,
return;
}
st_obj->size = size;
if (data)
st_no_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer, 0,
size, data);