summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-20 10:59:41 +0200
committerSamuel Pitoiset <[email protected]>2017-08-02 12:54:31 +0200
commit3f05193734c86750c7943e31949dc8c23c0e7d72 (patch)
tree34cd6624bc2e0d433d14d1c1a4f8ef441fb0ccb5 /src/mesa/main/bufferobj.c
parent7f19018cc3a66c44530994533f1700fba8ee9f7d (diff)
mesa: add KHR_no_error support to glNamedBufferData() and glBufferData()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 1bae0258054..2d1b652dfc0 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2024,6 +2024,14 @@ buffer_data_error(struct gl_context *ctx, struct gl_buffer_object *bufObj,
buffer_data(ctx, bufObj, target, size, data, usage, func, false);
}
+static void
+buffer_data_no_error(struct gl_context *ctx, struct gl_buffer_object *bufObj,
+ GLenum target, GLsizeiptr size, const GLvoid *data,
+ GLenum usage, const char *func)
+{
+ buffer_data(ctx, bufObj, target, size, data, usage, func, true);
+}
+
void
_mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
GLenum target, GLsizeiptr size, const GLvoid *data,
@@ -2033,6 +2041,17 @@ _mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
}
void GLAPIENTRY
+_mesa_BufferData_no_error(GLenum target, GLsizeiptr size, const GLvoid *data,
+ GLenum usage)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_buffer_object **bufObj = get_buffer_target(ctx, target);
+ buffer_data_no_error(ctx, *bufObj, target, size, data, usage,
+ "glBufferData");
+}
+
+void GLAPIENTRY
_mesa_BufferData(GLenum target, GLsizeiptr size,
const GLvoid *data, GLenum usage)
{
@@ -2048,6 +2067,17 @@ _mesa_BufferData(GLenum target, GLsizeiptr size,
}
void GLAPIENTRY
+_mesa_NamedBufferData_no_error(GLuint buffer, GLsizeiptr size,
+ const GLvoid *data, GLenum usage)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ buffer_data_no_error(ctx, bufObj, GL_NONE, size, data, usage,
+ "glNamedBufferData");
+}
+
+void GLAPIENTRY
_mesa_NamedBufferData(GLuint buffer, GLsizeiptr size, const GLvoid *data,
GLenum usage)
{