summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-22 15:46:54 +1000
committerTimothy Arceri <[email protected]>2017-05-30 08:03:32 +1000
commit9d331739ae72c5678701c8b1b5d0f460c6e2c857 (patch)
tree973fa9f255ee52831951d60b96437678bbafe27f /src/mesa/main/varray.c
parent9db595e0dee5fb26673633a98dd382b1cdabfcf9 (diff)
mesa: add KHR_no_error support for glBindVertexBuffer()
Reviewed-by: Iago Toral Quiroga <[email protected]> Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index f33f3022061..df14a8b765c 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1953,7 +1953,7 @@ static ALWAYS_INLINE void
vertex_array_vertex_buffer(struct gl_context *ctx,
struct gl_vertex_array_object *vao,
GLuint bindingIndex, GLuint buffer, GLintptr offset,
- GLsizei stride, const char *func)
+ GLsizei stride, bool no_error, const char *func)
{
struct gl_buffer_object *vbo;
if (buffer ==
@@ -1962,7 +1962,7 @@ vertex_array_vertex_buffer(struct gl_context *ctx,
} else if (buffer != 0) {
vbo = _mesa_lookup_bufferobj(ctx, buffer);
- if (!vbo && _mesa_is_gles31(ctx)) {
+ if (!no_error && !vbo && _mesa_is_gles31(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-gen name)", func);
return;
}
@@ -2043,7 +2043,18 @@ vertex_array_vertex_buffer_err(struct gl_context *ctx,
}
vertex_array_vertex_buffer(ctx, vao, bindingIndex, buffer, offset,
- stride, func);
+ stride, false, func);
+}
+
+
+void GLAPIENTRY
+_mesa_BindVertexBuffer_no_error(GLuint bindingIndex, GLuint buffer,
+ GLintptr offset, GLsizei stride)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ vertex_array_vertex_buffer(ctx, ctx->Array.VAO, bindingIndex,
+ buffer, offset, stride, true,
+ "glBindVertexBuffer");
}