aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
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 3e903cb3c29..461d69779a1 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1872,9 +1872,14 @@ buffer_sub_data(GLenum target, GLuint buffer, GLintptr offset,
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_sub_data(ctx, bufObj, offset, size, func))
@@ -1883,6 +1888,15 @@ buffer_sub_data(GLenum target, GLuint buffer, GLintptr offset,
void GLAPIENTRY
+_mesa_BufferSubData_no_error(GLenum target, GLintptr offset,
+ GLsizeiptr size, const GLvoid *data)
+{
+ buffer_sub_data(target, 0, offset, size, data, false, true,
+ "glBufferSubData");
+}
+
+
+void GLAPIENTRY
_mesa_BufferSubData(GLenum target, GLintptr offset,
GLsizeiptr size, const GLvoid *data)
{