st/mesa: minor clean-ups, reformatting, etc
authorBrian Paul <brianp@vmware.com>
Wed, 3 Jun 2009 03:46:17 +0000 (21:46 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 3 Jun 2009 03:46:17 +0000 (21:46 -0600)
src/mesa/state_tracker/st_cb_bufferobjects.c

index 340fbd9abaf2bc6982da6a3270b3db8eef0ded20..f140641d7ef1fcd2f37ddb1fb6abc5b286d057a7 100644 (file)
  **************************************************************************/
 
 
+/**
+ * Functions for pixel buffer objects and vertex/element buffer objects.
+ */
+
+
 #include "main/imports.h"
 #include "main/mtypes.h"
 #include "main/arrayobj.h"
 #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;