mesa: Add GL_ARB_sparse_buffer boilerplate
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 2 Feb 2017 19:47:31 +0000 (20:47 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Apr 2017 08:31:01 +0000 (10:31 +0200)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mapi/glapi/gen/ARB_sparse_buffer.xml [new file with mode: 0644]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h
src/mesa/main/tests/dispatch_sanity.cpp

diff --git a/src/mapi/glapi/gen/ARB_sparse_buffer.xml b/src/mapi/glapi/gen/ARB_sparse_buffer.xml
new file mode 100644 (file)
index 0000000..90bc659
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_sparse_buffer" number="172">
+
+    <function name="BufferPageCommitmentARB">
+        <param name="target" type="GLenum"/>
+        <param name="offset" type="GLintptr"/>
+        <param name="size" type="GLsizeiptr"/>
+        <param name="commit" type="GLboolean"/>
+    </function>
+
+    <!-- Only with GL_EXT_direct_state_access: glNamedBufferPageCommitmentEXT -->
+    
+    <!-- Only with GL_ARB_direct_state_access -->
+    <function name="NamedBufferPageCommitmentARB">
+        <param name="buffer" type="GLuint"/>
+        <param name="offset" type="GLintptr"/>
+        <param name="size" type="GLsizeiptr"/>
+        <param name="commit" type="GLboolean"/>
+    </function>
+    
+    <enum name="SPARSE_STORAGE_BIT_ARB" value="0x0400"/>
+    <enum name="SPARSE_BUFFER_PAGE_SIZE_ARB" value="0x82F8"/>
+
+</category>
+
+</OpenGLAPI>
index 4133259ffd39f4a123a969647736181f821aedc6..c793067d77f916351488c55f2502d935bc8087cf 100644 (file)
@@ -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 \
index af482707d038c2d886f3bbd64728e81541a9cf78..c0ee2f20f14e53220c2410647bec78dd8a83a72f 100644 (file)
 <!-- ARB extension 171 -->
 <xi:include href="ARB_pipeline_statistics_query.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<!-- ARB extension 172 -->
+<xi:include href="ARB_sparse_buffer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="es3.2">
     <!-- This should be in es_EXT, but this file is included first and
          the alias doesn't work otherwise. -->
index eca86aae98ce8e17439d868c821045bc99a2f21a..cbd92289b64278bd088bbdf39d701d8c0d6eb0e2 100644 (file)
@@ -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)
+{
+}
index 5dcc55301ce78f4477abfe87d230f3d17ec9cafa..cd0df93e96cd4b457ab72cb184978952c0c73bfd 100644 (file)
@@ -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
index f2eac2b1b524de96350a43647cdfb445fbee9762..6f3b54d223977b3a8255f0eb0607fc5807849b5b 100644 (file)
@@ -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)
index 4b23240a4697595365e036653ba53696db263295..262f8048e87d4441fbb46c646cbb0edc463ef7e9 100644 (file)
@@ -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;
index 2ea87043029726dda27a24c176de27b68d16b4e1..12a9ee7bae13028609bb3426cfb868d6de1779cb 100644 (file)
@@ -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 }
 };