replace _mesa_logbase2 with util_logbase2
[mesa.git] / src / mesa / state_tracker / st_cb_bufferobjects.h
index 1c991d2083776a0f062bb5d9f5c5540c60b18cdf..534506a62b343bb4714dafe22a1b03565c5f4a13 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  * 
- * Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2005 VMware, Inc.
  * All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef ST_CB_BUFFEROBJECTS_H
 #define ST_CB_BUFFEROBJECTS_H
 
-#include "main/compiler.h"
 #include "main/mtypes.h"
 
 struct dd_function_table;
 struct pipe_resource;
+struct pipe_screen;
 struct st_context;
 
 /**
@@ -43,26 +43,25 @@ struct st_buffer_object
 {
    struct gl_buffer_object Base;
    struct pipe_resource *buffer;     /* GPU storage */
-   struct pipe_transfer *transfer; /* In-progress map information */
+   struct pipe_transfer *transfer[MAP_COUNT];
 };
 
 
 /** cast wrapper */
-static INLINE struct st_buffer_object *
+static inline struct st_buffer_object *
 st_buffer_object(struct gl_buffer_object *obj)
 {
    return (struct st_buffer_object *) obj;
 }
 
 
-extern void
-st_bufferobj_validate_usage(struct st_context *st,
-                           struct st_buffer_object *obj,
-                           unsigned usage);
+enum pipe_transfer_usage
+st_access_flags_to_transfer_flags(GLbitfield access, bool wholeBuffer);
 
 
 extern void
-st_init_bufferobject_functions(struct dd_function_table *functions);
+st_init_bufferobject_functions(struct pipe_screen *screen,
+                               struct dd_function_table *functions);
 
 
 #endif