diff options
author | Brian Paul <[email protected]> | 2009-06-02 21:46:17 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-06-02 21:46:17 -0600 |
commit | 54576130a88fe93a64367f882cd680e37f0ec0ac (patch) | |
tree | 0de56c491e0c667f3a656585226fb6f33b305683 /src/mesa | |
parent | 5cd47e0361ed0fc8ddd6c4cee12a274173c9b25b (diff) |
st/mesa: minor clean-ups, reformatting, etc
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bufferobjects.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 340fbd9abaf..f140641d7ef 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -26,6 +26,11 @@ **************************************************************************/ +/** + * Functions for pixel buffer objects and vertex/element buffer objects. + */ + + #include "main/imports.h" #include "main/mtypes.h" #include "main/arrayobj.h" @@ -40,14 +45,6 @@ #include "pipe/p_inlines.h" - -/* Pixel buffers and Vertex/index buffers are handled through these - * mesa callbacks. Framebuffer/Renderbuffer objects are - * created/managed elsewhere. - */ - - - /** * There is some duplication between mesa's bufferobjects and our * bufmgr buffers. Both have an integer handle and a hashtable to @@ -191,7 +188,7 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access, struct gl_buffer_object *obj) { struct st_buffer_object *st_obj = st_buffer_object(obj); - GLuint flags; + uint flags; switch (access) { case GL_WRITE_ONLY: @@ -210,7 +207,7 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access, obj->Pointer = st_cond_flush_pipe_buffer_map(st_context(ctx), st_obj->buffer, flags); - if(obj->Pointer) { + if (obj->Pointer) { obj->Offset = 0; obj->Length = obj->Size; } @@ -218,7 +215,6 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access, } - /** * Called via glMapBufferRange(). */ @@ -229,7 +225,7 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target, { struct pipe_context *pipe = st_context(ctx)->pipe; struct st_buffer_object *st_obj = st_buffer_object(obj); - GLuint flags = 0; + uint flags = 0x0; char *map; if (access & GL_MAP_WRITE_BIT) @@ -249,8 +245,9 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target, assert(offset < obj->Size); assert(offset + length <= obj->Size); - map = obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags); - if(obj->Pointer) { + 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; map += offset; |