summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/bufferobj.h')
-rw-r--r--src/mesa/main/bufferobj.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 253a386c271..9814552eb96 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -37,19 +37,21 @@
*/
-/** Is the given buffer object currently mapped? */
+/** Is the given buffer object currently mapped by the GL user? */
static inline GLboolean
-_mesa_bufferobj_mapped(const struct gl_buffer_object *obj)
+_mesa_bufferobj_mapped(const struct gl_buffer_object *obj,
+ gl_map_buffer_index index)
{
- return obj->Pointer != NULL;
+ return obj->Mappings[index].Pointer != NULL;
}
/** Can we not use this buffer while mapped? */
static inline GLboolean
_mesa_check_disallowed_mapping(const struct gl_buffer_object *obj)
{
- return _mesa_bufferobj_mapped(obj) &&
- !(obj->AccessFlags & GL_MAP_PERSISTENT_BIT);
+ return _mesa_bufferobj_mapped(obj, MAP_USER) &&
+ !(obj->Mappings[MAP_USER].AccessFlags &
+ GL_MAP_PERSISTENT_BIT);
}
/**
@@ -109,6 +111,9 @@ _mesa_total_buffer_object_memory(struct gl_context *ctx);
extern void
_mesa_init_buffer_object_functions(struct dd_function_table *driver);
+extern void
+_mesa_buffer_unmap_all_mappings(struct gl_context *ctx,
+ struct gl_buffer_object *bufObj);
/*
* API functions