mesa: Add infrastructure for GL_ARB_clear_buffer_object
authorPi Tabred <servuswiegehtz@yahoo.de>
Sat, 14 Dec 2013 17:32:00 +0000 (10:32 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Dec 2013 16:06:51 +0000 (09:06 -0700)
 - add xml file for extension
 - add reference in gl_API.xml
 - add pointer to device driver function table (dd.h)
 - update dispatch_sanity.cpp

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mapi/glapi/gen/ARB_clear_buffer_object.xml [new file with mode: 0644]
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/dd.h
src/mesa/main/tests/dispatch_sanity.cpp

diff --git a/src/mapi/glapi/gen/ARB_clear_buffer_object.xml b/src/mapi/glapi/gen/ARB_clear_buffer_object.xml
new file mode 100644 (file)
index 0000000..cb97a01
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_ARB_clear_buffer_object" number="121">
+
+    <function name ="ClearBufferData" offset="assign">
+        <param name="target" type="GLenum"/>
+        <param name="internalformat" type="GLenum"/>
+        <param name="format" type="GLenum"/>
+        <param name="type" type="GLenum"/>
+        <param name="data" type="const GLvoid *"/>
+    </function>
+
+    <function name ="ClearBufferSubData" offset="assign">
+        <param name="target" type="GLenum"/>
+        <param name="internalformat" type="GLenum"/>
+        <param name="offset" type="GLintptr"/>
+        <param name="size" type="GLsizeiptr"/>
+        <param name="format" type="GLenum"/>
+        <param name="type" type="GLenum"/>
+        <param name="data" type="const GLvoid *"/>
+    </function>
+
+<!--    <function name="ClearNamedBufferDataEXT" offset="assign">
+        <param name="buffer" type="GLuint"/>
+        <param name="internalformat" type="GLenum"/>
+        <param name="format" type="GLenum"/>
+        <param name="type" type="GLenum"/>
+        <param name="data" type="const GLvoid *"/>
+    </function>
+
+
+    <function name="ClearNamedBufferSubDataEXT" offset="assign">
+        <param name="buffer" type="GLuint"/>
+        <param name="internalformat" type="GLenum"/>
+        <param name="offset" type="GLintptr"/>
+        <param name="size" type="GLsizeiptr"/>
+        <param name="format" type="GLenum"/>
+        <param name="type" type="GLenum"/>
+        <param name="data" type="const GLvoid *"/>
+    </function> -->
+
+</category>
+
+</OpenGLAPI>
index 778f3aadc29867282e95e0580ff4edf5b82303fc..697b2ecce28723340bd64f32ccf54125a1cf0aa6 100644 (file)
 
 </category>
 
+<!-- ARB extension #120 -->
 
-<!-- ARB extensions #120...#123 -->
+<xi:include href="ARB_clear_buffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extensions #122...#123 -->
 
 <xi:include href="ARB_texture_view.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <xi:include href="ARB_vertex_attrib_binding.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <!-- ARB extension #126 -->
index 3e263f4ac311b50bd4d1945da476df9eab0ee2d5..6e73691eab1883c44575b96965df20f4360a753d 100644 (file)
@@ -574,6 +574,12 @@ struct dd_function_table {
                             GLintptrARB offset, GLsizeiptrARB size,
                             GLvoid *data, struct gl_buffer_object *obj );
 
+   void (*ClearBufferSubData)( struct gl_context *ctx,
+                               GLintptr offset, GLsizeiptr size,
+                               const GLvoid *clearValue,
+                               GLsizeiptr clearValueSize,
+                               struct gl_buffer_object *obj );
+
    void (*CopyBufferSubData)( struct gl_context *ctx,
                               struct gl_buffer_object *src,
                               struct gl_buffer_object *dst,
index 2f4539a424767ef84f064e428b05608470bf9871..227a4fd8b89b795d32422cc82dbfb4248843bbbe 100644 (file)
@@ -846,8 +846,8 @@ const struct function gl_core_functions_possible[] = {
 // { "glGetObjectLabel", 43, -1 },                      // XXX: Add to xml
 // { "glObjectPtrLabel", 43, -1 },                      // XXX: Add to xml
 // { "glGetObjectPtrLabel", 43, -1 },                   // XXX: Add to xml
-// { "glClearBufferData", 43, -1 },                     // XXX: Add to xml
-// { "glClearBufferSubData", 43, -1 },                  // XXX: Add to xml
+   { "glClearBufferData", 43, -1 },
+   { "glClearBufferSubData", 43, -1 },
 // { "glClearNamedBufferDataEXT", 43, -1 },             // XXX: Add to xml
 // { "glClearNamedBufferSubDataEXT", 43, -1 },          // XXX: Add to xml
 // { "glDispatchCompute", 43, -1 },                     // XXX: Add to xml