aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-04 13:31:27 +1000
committerTimothy Arceri <[email protected]>2017-05-07 15:29:33 +1000
commitbbae62c714b8e4b74ab8e4105ca5a6bff40ba5ce (patch)
tree489f2dc5dc59960d2a9f91dd5cc92dd74dc6387e /src/mesa
parent0b2e4da80a00a2d40c82f39b5d369664b63ef8b4 (diff)
mesa: add KHR_no_error support for unmap buffer functions
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/bufferobj.c19
-rw-r--r--src/mesa/main/bufferobj.h4
2 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0fdb623b4b1..6fa32e90fda 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2067,6 +2067,16 @@ validate_and_unmap_buffer(struct gl_context *ctx,
}
GLboolean GLAPIENTRY
+_mesa_UnmapBuffer_no_error(GLenum target)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object **bufObjPtr = get_buffer_target(ctx, target);
+ struct gl_buffer_object *bufObj = *bufObjPtr;
+
+ return unmap_buffer(ctx, bufObj);
+}
+
+GLboolean GLAPIENTRY
_mesa_UnmapBuffer(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2080,6 +2090,15 @@ _mesa_UnmapBuffer(GLenum target)
}
GLboolean GLAPIENTRY
+_mesa_UnmapNamedBuffer_no_error(GLuint buffer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+
+ return unmap_buffer(ctx, bufObj);
+}
+
+GLboolean GLAPIENTRY
_mesa_UnmapNamedBuffer(GLuint buffer)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 30e3105ff66..d538d0f2ca5 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -253,9 +253,13 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
const GLvoid *data);
GLboolean GLAPIENTRY
+_mesa_UnmapBuffer_no_error(GLenum target);
+GLboolean GLAPIENTRY
_mesa_UnmapBuffer(GLenum target);
GLboolean GLAPIENTRY
+_mesa_UnmapNamedBuffer_no_error(GLuint buffer);
+GLboolean GLAPIENTRY
_mesa_UnmapNamedBuffer(GLuint buffer);
void GLAPIENTRY