X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fbufferobj.h;h=5dcc55301ce78f4477abfe87d230f3d17ec9cafa;hb=9f93afb9a5586cb90e127ba7d63de3b416d08821;hp=3eac96df23ee4edff726a71fd0b0d390272b9885;hpb=1aff899a874abddc2d79e595242a233e874e4a96;p=mesa.git diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 3eac96df23e..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) && @@ -108,6 +114,10 @@ _mesa_initialize_buffer_object(struct gl_context *ctx, struct gl_buffer_object *obj, GLuint name); +extern void +_mesa_delete_buffer_object(struct gl_context *ctx, + struct gl_buffer_object *bufObj); + extern void _mesa_reference_buffer_object_(struct gl_context *ctx, struct gl_buffer_object **ptr,