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) &&
extern bool
_mesa_handle_bind_buffer_gen(struct gl_context *ctx,
- GLenum target,
GLuint buffer,
struct gl_buffer_object **buf_handle,
const char *caller);
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,
GLsizeiptr size, const GLvoid *data);
void GLAPIENTRY
-_mesa_GetBufferSubData(GLenum target, GLintptrARB offset,
- GLsizeiptrARB size, void * data);
+_mesa_GetBufferSubData(GLenum target, GLintptr offset,
+ GLsizeiptr size, GLvoid *data);
+
+void GLAPIENTRY
+_mesa_GetNamedBufferSubData(GLuint buffer, GLintptr offset,
+ GLsizeiptr size, GLvoid *data);
void GLAPIENTRY
_mesa_ClearBufferData(GLenum target, GLenum internalformat,
void GLAPIENTRY
_mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params);
+void GLAPIENTRY
+_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params);
+
+
void GLAPIENTRY
_mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
GLintptr readOffset, GLintptr writeOffset,
_mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
GLsizeiptr length);
-GLenum GLAPIENTRY
-_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
-
-GLenum GLAPIENTRY
-_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option);
-
-void GLAPIENTRY
-_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name,
- GLenum pname, GLint* params);
-
void GLAPIENTRY
_mesa_BindBufferRange(GLenum target, GLuint index,
GLuint buffer, GLintptr offset, GLsizeiptr size);