summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-05-18 13:23:15 +1000
committerMarek Olšák <[email protected]>2019-06-28 15:41:14 -0400
commiteec5c01b5efc1ab81bfe1af15855e17e852ed4a3 (patch)
treeb67813005cb177cae6fa35f5471f0ecd362ad1f4 /src
parent83ed9485b75c92e269c000a5d184393fbe4cbd77 (diff)
mesa: add support for glNamedBufferStorageEXT
This is available in ARB_buffer_storage when EXT_direct_state_access is present. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/gl_API.xml7
-rw-r--r--src/mapi/glapi/gen/static_data.py1
-rw-r--r--src/mesa/main/bufferobj.c15
-rw-r--r--src/mesa/main/bufferobj.h3
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp1
5 files changed, 27 insertions, 0 deletions
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index ca7ac95ded0..60ae1aaa0db 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8271,6 +8271,13 @@
<param name="data" type="const GLvoid *"/>
<param name="flags" type="GLbitfield"/>
</function>
+
+ <function name="NamedBufferStorageEXT">
+ <param name="buffer" type="GLuint" />
+ <param name="size" type="GLsizeiptr" />
+ <param name="data" type="const GLvoid *" />
+ <param name="flags" type="GLbitfield" />
+ </function>
</category>
<xi:include href="ARB_clear_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py
index 92a07abd9db..582530c046a 100644
--- a/src/mapi/glapi/gen/static_data.py
+++ b/src/mapi/glapi/gen/static_data.py
@@ -1476,6 +1476,7 @@ offsets = {
"BindMultiTextureEXT": 1440,
"NamedBufferDataEXT": 1441,
"NamedBufferSubDataEXT": 1442,
+ "NamedBufferStorageEXT": 1443,
}
functions = [
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 6b8a2111a8f..0d350dbabd5 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1937,6 +1937,21 @@ _mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data,
false, false, false, "glBufferStorage");
}
+void GLAPIENTRY
+_mesa_NamedBufferStorageEXT(GLuint buffer, GLsizeiptr size,
+ const GLvoid *data, GLbitfield flags)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+ &bufObj, "glNamedBufferStorageEXT"))
+ return;
+
+ inlined_buffer_storage(GL_NONE, buffer, size, data, flags, GL_NONE, 0,
+ true, false, false, "glNamedBufferStorageEXT");
+}
+
void GLAPIENTRY
_mesa_BufferStorageMemEXT(GLenum target, GLsizeiptr size,
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 74124649bb6..6b35d70606f 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -189,6 +189,9 @@ void GLAPIENTRY
_mesa_BufferStorage(GLenum target, GLsizeiptr size, const GLvoid *data,
GLbitfield flags);
void GLAPIENTRY
+_mesa_NamedBufferStorageEXT(GLuint buffer, GLsizeiptr size,
+ const GLvoid *data, GLbitfield flags);
+void GLAPIENTRY
_mesa_BufferStorageMemEXT(GLenum target, GLsizeiptr size,
GLuint memory, GLuint64 offset);
void GLAPIENTRY
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 0fba8d19fe3..c789a2d513b 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -1295,6 +1295,7 @@ const struct function common_desktop_functions_possible[] = {
/* GL_ARB_buffer_storage */
{ "glBufferStorage", 43, -1 },
+ { "glNamedBufferStorageEXT", 43, -1 },
/* GL_ARB_clear_texture */
{ "glClearTexImage", 13, -1 },