summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mapi/glapi/gen/EXT_direct_state_access.xml8
-rw-r--r--src/mapi/glapi/gen/static_data.py1
-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
5 files changed, 40 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml
index d926b25014d..336f3ad5289 100644
--- a/src/mapi/glapi/gen/EXT_direct_state_access.xml
+++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml
@@ -1044,6 +1044,14 @@
<param name="height" type="GLsizei" />
</function>
+ <function name="NamedCopyBufferSubDataEXT">
+ <param name="readBuffer" type="GLuint" />
+ <param name="writeBuffer" type="GLuint" />
+ <param name="readOffset" type="GLintptr" />
+ <param name="writeOffset" type="GLintptr" />
+ <param name="size" type="GLsizeiptr" />
+ </function>
+
<!-- ARB_vertex_program -->
<function name="NamedProgramStringEXT">
<param name="program" type="GLuint" />
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
index 344f476a676..01bc6ed95ea 100644
--- a/src/mapi/glapi/gen/static_data.py
+++ b/src/mapi/glapi/gen/static_data.py
@@ -1596,6 +1596,7 @@ offsets = {
"GenerateTextureMipmapEXT": 1560,
"GenerateMultiTexMipmapEXT": 1561,
"NamedRenderbufferStorageMultisampleEXT": 1562,
+ "NamedCopyBufferSubDataEXT": 1563,
}
functions = [
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 },