summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/bufferobj.c33
-rw-r--r--src/mesa/main/bufferobj.h9
2 files changed, 41 insertions, 1 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index b0a7543f577..d7e77de4245 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -2349,6 +2349,24 @@ copy_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *src,
}
void GLAPIENTRY
+_mesa_CopyBufferSubData_no_error(GLenum readTarget, GLenum writeTarget,
+ GLintptr readOffset, GLintptr writeOffset,
+ GLsizeiptr size)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_buffer_object **src_ptr = get_buffer_target(ctx, readTarget);
+ struct gl_buffer_object *src = *src_ptr;
+
+ struct gl_buffer_object **dst_ptr = get_buffer_target(ctx, writeTarget);
+ struct gl_buffer_object *dst = *dst_ptr;
+
+ dst->MinMaxCacheDirty = true;
+ ctx->Driver.CopyBufferSubData(ctx, src, dst, readOffset, writeOffset,
+ size);
+}
+
+void GLAPIENTRY
_mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size)
@@ -2371,6 +2389,21 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
}
void GLAPIENTRY
+_mesa_CopyNamedBufferSubData_no_error(GLuint readBuffer, GLuint writeBuffer,
+ GLintptr readOffset,
+ GLintptr writeOffset, GLsizeiptr size)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_buffer_object *src = _mesa_lookup_bufferobj(ctx, readBuffer);
+ struct gl_buffer_object *dst = _mesa_lookup_bufferobj(ctx, writeBuffer);
+
+ dst->MinMaxCacheDirty = true;
+ ctx->Driver.CopyBufferSubData(ctx, src, dst, readOffset, writeOffset,
+ size);
+}
+
+void GLAPIENTRY
_mesa_CopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size)
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 93a360dcb63..926ffb4faf2 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -254,13 +254,20 @@ _mesa_GetBufferPointerv(GLenum target, GLenum pname, GLvoid **params);
void GLAPIENTRY
_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params);
-
+void GLAPIENTRY
+_mesa_CopyBufferSubData_no_error(GLenum readTarget, GLenum writeTarget,
+ GLintptr readOffset, GLintptr writeOffset,
+ GLsizeiptr size);
void GLAPIENTRY
_mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size);
void GLAPIENTRY
+_mesa_CopyNamedBufferSubData_no_error(GLuint readBuffer, GLuint writeBuffer,
+ GLintptr readOffset,
+ GLintptr writeOffset, GLsizeiptr size);
+void GLAPIENTRY
_mesa_CopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size);