summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-02-11 16:10:20 -0800
committerLaura Ekstrand <[email protected]>2015-03-17 10:18:34 -0700
commit1e45752aaf4ac7d2324d71bda4d2ac34f3abf8bd (patch)
tree976a848177959f11b8449764bda86665b39e8e50 /src/mesa/main/bufferobj.c
parentefcb830d49d601140a62a096a4ff4c215e68d89c (diff)
main: Add entry points for GetNamedBufferParameteri[64]v.
Reviewed-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e39ad94f160..4c2cdf491f4 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2007,6 +2007,45 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
*params = parameter;
}
+void GLAPIENTRY
+_mesa_GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+ GLint64 parameter;
+
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+ "glGetNamedBufferParameteriv");
+ if (!bufObj)
+ return;
+
+ if (!get_buffer_parameter(ctx, bufObj, pname, &parameter,
+ "glGetNamedBufferParameteriv"))
+ return; /* Error already recorded. */
+
+ *params = (GLint) parameter;
+}
+
+void GLAPIENTRY
+_mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
+ GLint64 *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+ GLint64 parameter;
+
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+ "glGetNamedBufferParameteri64v");
+ if (!bufObj)
+ return;
+
+ if (!get_buffer_parameter(ctx, bufObj, pname, &parameter,
+ "glGetNamedBufferParameteri64v"))
+ return; /* Error already recorded. */
+
+ *params = parameter;
+}
+
void GLAPIENTRY
_mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params)