aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2019-09-11 10:26:50 +0200
committerPierre-Eric Pelloux-Prayer <[email protected]>2019-10-18 10:26:26 +0200
commit50533d408db1048a148012e2c3e1be5aca2ae93d (patch)
tree5ecf8cc39f7aedd8a29c24f225a46563485dad3b /src/mesa
parentda21435a7aab65f3b76079bad4800497af9b0158 (diff)
mesa: add EXT_dsa NamedCopyBufferSubDataEXT function
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/bufferobj.c24
-rw-r--r--src/mesa/main/bufferobj.h5
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp4
3 files changed, 31 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index bffca3c898d..e370d04c31d 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -3091,6 +3091,30 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
}
void GLAPIENTRY
+_mesa_NamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer,
+ GLintptr readOffset, GLintptr writeOffset,
+ GLsizeiptr size)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *src, *dst;
+
+ src = _mesa_lookup_bufferobj(ctx, readBuffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, readBuffer,
+ &src,
+ "glNamedCopyBufferSubDataEXT"))
+ return;
+
+ dst = _mesa_lookup_bufferobj(ctx, writeBuffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, writeBuffer,
+ &dst,
+ "glNamedCopyBufferSubDataEXT"))
+ return;
+
+ copy_buffer_sub_data(ctx, src, dst, readOffset, writeOffset, size,
+ "glNamedCopyBufferSubDataEXT");
+}
+
+void GLAPIENTRY
_mesa_CopyNamedBufferSubData_no_error(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 dc752fab477..6cc04eb4bb8 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -346,6 +346,11 @@ _mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
GLsizeiptr size);
void GLAPIENTRY
+_mesa_NamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer,
+ GLintptr readOffset, GLintptr writeOffset,
+ GLsizeiptr size);
+
+void GLAPIENTRY
_mesa_CopyNamedBufferSubData_no_error(GLuint readBuffer, GLuint writeBuffer,
GLintptr readOffset,
GLintptr writeOffset, GLsizeiptr size);
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 3ff13085894..5f3e25a2c5b 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -1155,7 +1155,7 @@ const struct function common_desktop_functions_possible[] = {
/* GL_EXT_direct_state_access - GL 3.0 */
{ "glNamedRenderbufferStorageEXT", 30, -1 },
{ "glGetNamedRenderbufferParameterivEXT", 30, -1 },
- //{ "glNamedRenderbufferStorageMultisampleEXT", 30, -1 },
+ { "glNamedRenderbufferStorageMultisampleEXT", 30, -1 },
{ "glCheckNamedFramebufferStatusEXT", 30, -1 },
{ "glNamedFramebufferTexture1DEXT", 30, -1 },
{ "glNamedFramebufferTexture2DEXT", 30, -1 },
@@ -1168,7 +1168,7 @@ const struct function common_desktop_functions_possible[] = {
{ "glFramebufferDrawBuffersEXT", 30, -1 },
{ "glFramebufferReadBufferEXT", 30, -1 },
{ "glGetFramebufferParameterivEXT", 30, -1 },
- //{ "glNamedCopyBufferSubDataEXT", 30, -1 },
+ { "glNamedCopyBufferSubDataEXT", 30, -1 },
//{ "glVertexArrayVertexOffsetEXT", 30, -1 },
//{ "glVertexArrayColorOffsetEXT", 30, -1 },
//{ "glVertexArrayEdgeFlagOffsetEXT", 30, -1 },