aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-05-12 16:51:24 +1000
committerTimothy Arceri <[email protected]>2017-05-17 10:12:03 +1000
commit624dc2833e0d0263b434e234437dfbd9f4840b75 (patch)
tree1b3bd914e931872be9d3b517c512cf328a214954 /src/mesa/main/bufferobj.c
parentcdbfb19420cc48c5d9fe2c88ff9b29da6b407401 (diff)
mesa: add KHR_no_error support for glBufferStorage()
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 09ef233a835..674ff630cd6 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1609,9 +1609,14 @@ inlined_buffer_storage(GLenum target, GLuint buffer, GLsizeiptr size,
return;
}
} else {
- bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION);
- if (!bufObj)
- return;
+ if (no_error) {
+ struct gl_buffer_object **bufObjPtr = get_buffer_target(ctx, target);
+ bufObj = *bufObjPtr;
+ } else {
+ bufObj = get_buffer(ctx, func, target, GL_INVALID_OPERATION);
+ if (!bufObj)
+ return;
+ }
}
if (no_error || validate_buffer_storage(ctx, bufObj, size, flags, func))
@@ -1620,6 +1625,15 @@ inlined_buffer_storage(GLenum target, GLuint buffer, GLsizeiptr size,
void GLAPIENTRY
+_mesa_BufferStorage_no_error(GLenum target, GLsizeiptr size,
+ const GLvoid *data, GLbitfield flags)
+{
+ inlined_buffer_storage(target, 0, size, data, flags, false, true,
+ "glBufferStorage");
+}
+
+
+void GLAPIENTRY
_mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data,
GLbitfield flags)
{