}
+/**
+ * Called via glMapBufferRange()
+ */
+static void *
+radeonMapBufferRange(struct gl_context * ctx,
+ GLintptr offset, GLsizeiptr length,
+ GLbitfield access, struct gl_buffer_object *obj)
+{
+ struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);
+ const GLboolean write_only =
+ (access & (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT)) == GL_MAP_WRITE_BIT;
+
+ if (write_only) {
+ ctx->Driver.Flush(ctx);
+ }
+
+ if (radeon_obj->bo == NULL) {
+ obj->Pointer = NULL;
+ return NULL;
+ }
+
+ obj->Offset = offset;
+ obj->Length = length;
+ obj->AccessFlags = access;
+
+ radeon_bo_map(radeon_obj->bo, write_only);
+
+ obj->Pointer = radeon_obj->bo->ptr + offset;
+ return obj->Pointer;
+}
+
+
/**
* Called via glUnmapBufferARB()
*/
functions->BufferSubData = radeonBufferSubData;
functions->GetBufferSubData = radeonGetBufferSubData;
functions->MapBuffer = radeonMapBuffer;
+ functions->MapBufferRange = radeonMapBufferRange;
functions->UnmapBuffer = radeonUnmapBuffer;
}