From d085c7ce7c7da3441ea6320c4eb690d665d8c8dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Thu, 2 Feb 2017 20:47:31 +0100 Subject: [PATCH] mesa: Add GL_ARB_sparse_buffer boilerplate MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Ian Romanick Reviewed-by: Marek Olšák --- src/mapi/glapi/gen/ARB_sparse_buffer.xml | 30 ++++++++++++++++++++++++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 3 +++ src/mesa/main/bufferobj.c | 12 ++++++++++ src/mesa/main/bufferobj.h | 7 ++++++ src/mesa/main/extensions_table.h | 1 + src/mesa/main/mtypes.h | 1 + src/mesa/main/tests/dispatch_sanity.cpp | 4 ++++ 8 files changed, 59 insertions(+) create mode 100644 src/mapi/glapi/gen/ARB_sparse_buffer.xml diff --git a/src/mapi/glapi/gen/ARB_sparse_buffer.xml b/src/mapi/glapi/gen/ARB_sparse_buffer.xml new file mode 100644 index 00000000000..90bc659fdaf --- /dev/null +++ b/src/mapi/glapi/gen/ARB_sparse_buffer.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index 4133259ffd3..c793067d77f 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -164,6 +164,7 @@ API_XML = \ ARB_shader_image_load_store.xml \ ARB_shader_subroutine.xml \ ARB_shader_storage_buffer_object.xml \ + ARB_sparse_buffer.xml \ ARB_sync.xml \ ARB_tessellation_shader.xml \ ARB_texture_barrier.xml \ diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index af482707d03..c0ee2f20f14 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8314,6 +8314,9 @@ + + + diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index eca86aae98c..cbd92289b64 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -4043,3 +4043,15 @@ _mesa_InvalidateBufferData(GLuint buffer) if (ctx->Driver.InvalidateBufferSubData) ctx->Driver.InvalidateBufferSubData(ctx, bufObj, 0, bufObj->Size); } + +void GLAPIENTRY +_mesa_BufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizeiptr size, + GLboolean commit) +{ +} + +void GLAPIENTRY +_mesa_NamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLboolean commit) +{ +} diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h index 5dcc55301ce..cd0df93e96c 100644 --- a/src/mesa/main/bufferobj.h +++ b/src/mesa/main/bufferobj.h @@ -348,5 +348,12 @@ _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset, void GLAPIENTRY _mesa_InvalidateBufferData(GLuint buffer); +void GLAPIENTRY +_mesa_BufferPageCommitmentARB(GLenum target, GLintptr offset, GLsizeiptr size, + GLboolean commit); + +void GLAPIENTRY +_mesa_NamedBufferPageCommitmentARB(GLuint buffer, GLintptr offset, + GLsizeiptr size, GLboolean commit); #endif diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index f2eac2b1b52..6f3b54d2239 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -125,6 +125,7 @@ EXT(ARB_shading_language_100 , dummy_true EXT(ARB_shading_language_420pack , ARB_shading_language_420pack , GLL, GLC, x , x , 2011) EXT(ARB_shading_language_packing , ARB_shading_language_packing , GLL, GLC, x , x , 2011) EXT(ARB_shadow , ARB_shadow , GLL, x , x , x , 2001) +EXT(ARB_sparse_buffer , ARB_sparse_buffer , GLL, GLC, x , x , 2014) EXT(ARB_stencil_texturing , ARB_stencil_texturing , GLL, GLC, x , x , 2012) EXT(ARB_sync , ARB_sync , GLL, GLC, x , x , 2003) EXT(ARB_tessellation_shader , ARB_tessellation_shader , x , GLC, x , x , 2009) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4b23240a469..262f8048e87 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3905,6 +3905,7 @@ struct gl_extensions GLboolean ARB_shading_language_packing; GLboolean ARB_shading_language_420pack; GLboolean ARB_shadow; + GLboolean ARB_sparse_buffer; GLboolean ARB_stencil_texturing; GLboolean ARB_sync; GLboolean ARB_tessellation_shader; diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 2ea87043029..12a9ee7bae1 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -961,6 +961,10 @@ const struct function common_desktop_functions_possible[] = { /* GL_KHR_blend_equation_advanced */ { "glBlendBarrierKHR", 20, -1 }, + /* GL_ARB_sparse_buffer */ + { "glBufferPageCommitmentARB", 43, -1 }, + { "glNamedBufferPageCommitmentARB", 43, -1 }, + { NULL, 0, -1 } }; -- 2.30.2