glapi: Add uniform buffer object API
authorVincent Lejeune <vljn@ovi.com>
Sun, 25 Dec 2011 18:17:01 +0000 (19:17 +0100)
committerEric Anholt <eric@anholt.net>
Thu, 21 Jun 2012 17:57:45 +0000 (10:57 -0700)
v2: Fix a typo spotted by Eric Anholt.
v3: Fix missing "GL" on types, fix style, fix Studly_Caps extension name,
    drop commented code duplicated with GL3x.xml [anholt]

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mapi/glapi/gen/ARB_uniform_buffer_object.xml [new file with mode: 0644]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/gl_API.xml

diff --git a/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml b/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml
new file mode 100644 (file)
index 0000000..cbcd339
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_uniform_buffer_object" number="57">
+
+<enum name="UNIFORM_BUFFER" value="0x8A11" />
+<enum name="UNIFORM_BUFFER_BINDING" value="0x8A28" />
+<enum name="UNIFORM_BUFFER_START" value="0x8A29" />
+<enum name="UNIFORM_BUFFER_SIZE" value="0x8A2A" />
+<enum name="MAX_VERTEX_UNIFORM_BLOCKS" value="0x8A2B" />
+<enum name="MAX_GEOMETRY_UNIFORM_BLOCKS" value="0x8A2C" />
+<enum name="MAX_FRAGMENT_UNIFORM_BLOCKS" value="0x8A2D" />
+<enum name="MAX_COMBINED_UNIFORM_BLOCKS" value="0x8A2E" />
+<enum name="MAX_UNIFORM_BUFFER_BINDINGS" value="0x8A2F" />
+<enum name="MAX_UNIFORM_BLOCK_SIZE" value="0x8A30" />
+<enum name="MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS" value="0x8A31" />
+<enum name="MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS" value="0x8A32" />
+<enum name="MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS" value="0x8A33" />
+<enum name="UNIFORM_BUFFER_OFFSET_ALIGNMENT" value="0x8A34" />
+<enum name="ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH" value="0x8A35" />
+<enum name="ACTIVE_UNIFORM_BLOCKS" value="0x8A36" />
+<enum name="UNIFORM_TYPE" value="0x8A37" />
+<enum name="UNIFORM_SIZE" value="0x8A38" />
+<enum name="UNIFORM_NAME_LENGTH" value="0x8A39" />
+<enum name="UNIFORM_BLOCK_INDEX" value="0x8A3A" />
+<enum name="UNIFORM_OFFSET" value="0x8A3B" />
+<enum name="UNIFORM_ARRAY_STRIDE" value="0x8A3C" />
+<enum name="UNIFORM_MATRIX_STRIDE" value="0x8A3D" />
+<enum name="UNIFORM_IS_ROW_MAJOR" value="0x8A3E" />
+<enum name="UNIFORM_BLOCK_BINDING" value="0x8A3F" />
+<enum name="UNIFORM_BLOCK_DATA_SIZE" value="0x8A40" />
+<enum name="UNFIROM_BLOCK_NAME_LENGTH" value="0x8A41" />
+<enum name="UNIFORM_BLOCK_ACTIVE_UNIFORMS" value="0x8A42" />
+<enum name="UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES" value="0x8A43" />
+<enum name="UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER" value="0x8A44" />
+<enum name="UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER" value="0x8A45" />
+<enum name="UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER" value="0x8A46" />
+<enum name="INVALID_INDEX" value="0xFFFFFFFF" />
+
+<function name="GetUniformIndices" offset="assign">
+    <param name="program" type="GLuint" />
+    <param name="uniformCount" type="GLsizei" />
+    <param name="uniformNames" type="const GLchar **" />
+    <param name="uniformIndices" type="GLuint *" />
+</function>
+
+<function name="GetActiveUniformsiv" offset="assign">
+    <param name="program" type="GLuint" />
+    <param name="uniformCount" type="GLsizei" />
+    <param name="uniformIndices" type="const GLuint *" />
+    <param name="pname" type="GLenum" />
+    <param name="params" type="GLint *" />
+</function>
+
+<function name="GetActiveUniformName" offset="assign">
+    <param name="program" type="GLuint" />
+    <param name="uniformIndex" type="GLuint" />
+    <param name="bufSize" type="GLsizei" />
+    <param name="length" type="GLsizei *" />
+    <param name="uniformName" type="GLchar *" />
+</function>
+
+<function name="GetUniformBlockIndex" offset="assign">
+    <return type="GLuint"/>
+    <param name="program" type="GLuint" />
+    <param name="uniformBlockName" type="const GLchar *" />
+</function>
+
+<function name="GetActiveUniformBlockiv" offset="assign">
+    <param name="program" type="GLuint" />
+    <param name="uniformBlockIndex" type="GLuint" />
+    <param name="pname" type="GLenum" />
+    <param name="params" type="GLint *" />
+</function>
+
+<function name="GetActiveUniformBlockName" offset="assign">
+    <param name="program" type="GLuint" />
+    <param name="uniformBlockIndex" type="GLuint" />
+    <param name="bufSize" type="GLsizei" />
+    <param name="length" type="GLsizei *" />
+    <param name="uniformBlockName" type="GLchar *" />
+</function>
+
+<!-- Duplicated with GL3x.xml: BindBufferRange, BindBufferBase,
+     GetIntegeri_v -->
+
+<function name="UniformBlockBinding" offset="assign" >
+    <param name="program" type="GLuint" />
+    <param name="uniformBlockIndex" type="GLuint" />
+    <param name="uniformBlockBinding" type="GLuint" />
+</function>
+
+</category>
+
+</OpenGLAPI>
index 9a5016291b8ff2da80c0bd9ceb282bba43c8d56f..d0d0a7ba099eb92312e34359a168d44b305d859b 100644 (file)
@@ -90,6 +90,7 @@ API_XML = \
        ARB_vertex_type_2_10_10_10_rev.xml \
        APPLE_object_purgeable.xml \
        APPLE_vertex_array_object.xml \
+       ARB_uniform_buffer_object.xml \
        EXT_draw_buffers2.xml \
        EXT_framebuffer_object.xml \
        EXT_gpu_shader4.xml \
index c96b2a00fd7131636117569277254acf05f3bc8b..af051355642847bceb3caffba0cf62bf2944690d 100644 (file)
 
 <!-- ARB extension number 55 is a GLX extension. -->
 <!-- ARB extension number 56 is a WGL extension. -->
-<!-- 57. GL_ARB_uniform_buffer_object -->
+
+<xi:include href="ARB_uniform_buffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- 58. GL_ARB_compatibility -->
 
 <xi:include href="ARB_copy_buffer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>