summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-04-27 10:42:39 -0600
committerBrian Paul <[email protected]>2016-04-28 09:04:17 -0600
commitf365488eaaaaab8eb61bc614a105f397c5c80a6f (patch)
tree0065a61a4b2da8de6a4d97e26862c092eda543a6
parent7e7710a068a7c1e9095eb8e718c56d925d2f0164 (diff)
mesa: improve comment on _mesa_check_disallowed_mapping(), return bool
The old comment was a bit terse. Also, change the function return type to bool. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/mesa/main/bufferobj.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index a5bfe886b39..5dcc55301ce 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -45,8 +45,14 @@ _mesa_bufferobj_mapped(const struct gl_buffer_object *obj,
return obj->Mappings[index].Pointer != NULL;
}
-/** Can we not use this buffer while mapped? */
-static inline GLboolean
+/**
+ * Check whether the given buffer object is illegally mapped prior to
+ * drawing from (or reading back to) the buffer.
+ * Note that it's legal for a buffer to be mapped at draw/readback time
+ * if it was mapped persistently (See GL_ARB_buffer_storage spec).
+ * \return true if the buffer is illegally mapped, false otherwise
+ */
+static inline bool
_mesa_check_disallowed_mapping(const struct gl_buffer_object *obj)
{
return _mesa_bufferobj_mapped(obj, MAP_USER) &&