summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 4c2cdf491f4..2811604b115 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2066,6 +2066,26 @@ _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)
*params = bufObj->Mappings[MAP_USER].Pointer;
}
+void GLAPIENTRY
+_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ if (pname != GL_BUFFER_MAP_POINTER) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointerv(pname != "
+ "GL_BUFFER_MAP_POINTER)");
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+ "glGetNamedBufferPointerv");
+ if (!bufObj)
+ return;
+
+ *params = bufObj->Mappings[MAP_USER].Pointer;
+}
+
void
_mesa_copy_buffer_sub_data(struct gl_context *ctx,