glapi: Add infrastructure for ARB_vertex_attrib_binding
authorFredrik Höglund <fredrik@kde.org>
Tue, 9 Apr 2013 18:44:58 +0000 (20:44 +0200)
committerFredrik Höglund <fredrik@kde.org>
Thu, 7 Nov 2013 15:20:45 +0000 (16:20 +0100)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml [new file with mode: 0644]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/varray.c
src/mesa/main/varray.h

diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml
new file mode 100644 (file)
index 0000000..0ee6a3c
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_vertex_attrib_binding" number="125">
+
+    <function name="BindVertexBuffer" offset="assign">
+        <param name="bindingindex" type="GLuint"/>
+        <param name="buffer" type="GLuint"/>
+        <param name="offset" type="GLintptr"/>
+        <param name="stride" type="GLsizei"/>
+    </function>
+
+    <function name="VertexAttribFormat" offset="assign">
+        <param name="attribindex" type="GLuint"/>
+        <param name="size" type="GLint"/>
+        <param name="type" type="GLenum"/>
+        <param name="normalized" type="GLboolean"/>
+        <param name="relativeoffset" type="GLuint"/>
+    </function>
+
+    <function name="VertexAttribIFormat" offset="assign">
+        <param name="attribindex" type="GLuint"/>
+        <param name="size" type="GLint"/>
+        <param name="type" type="GLenum"/>
+        <param name="relativeoffset" type="GLuint"/>
+    </function>
+
+    <function name="VertexAttribLFormat" offset="assign">
+        <param name="attribindex" type="GLuint"/>
+        <param name="size" type="GLint"/>
+        <param name="type" type="GLenum"/>
+        <param name="relativeoffset" type="GLuint"/>
+    </function>
+
+    <function name="VertexAttribBinding" offset="assign">
+        <param name="attribindex" type="GLuint"/>
+        <param name="bindingindex" type="GLuint"/>
+    </function>
+
+    <function name="VertexBindingDivisor" offset="assign">
+        <param name="attribindex" type="GLuint"/>
+        <param name="divisor" type="GLuint"/>
+    </function>
+
+    <enum name="VERTEX_ATTRIB_BINDING" value="0x82D4"/>
+    <enum name="VERTEX_ATTRIB_RELATIVE_OFFSET" value="0x82D5"/>
+    <enum name="VERTEX_BINDING_DIVISOR" value="0x82D6"/>
+    <enum name="VERTEX_BINDING_OFFSET" value="0x82D7"/>
+    <enum name="VERTEX_BINDING_STRIDE" value="0x82D8"/>
+    <enum name="MAX_VERTEX_ATTRIB_RELATIVE_OFFSET" value="0x82D9"/>
+    <enum name="MAX_VERTEX_ATTRIB_BINDINGS" value="0x82DA"/>
+
+</category>
+</OpenGLAPI>
index cbbf659dd01da48e18894d1d8b061c4e16e692d5..9c2538783258b197972f6b67d4f420e5b58837d5 100644 (file)
@@ -125,6 +125,7 @@ API_XML = \
        ARB_texture_storage_multisample.xml \
        ARB_texture_storage.xml \
        ARB_vertex_array_object.xml \
+       ARB_vertex_attrib_binding.xml \
        AMD_draw_buffers_blend.xml \
        AMD_performance_monitor.xml \
        ARB_vertex_type_2_10_10_10_rev.xml \
index 69014c5d2f0949c04b3697bfe5158fb420401cf7..a2d914ac46ff01757327f553e65c65e3dc2633f3 100644 (file)
 
 </category>
 
-<!-- ARB extensions #120...#126 -->
+<!-- ARB extensions #120...#124 -->
+
+<xi:include href="ARB_vertex_attrib_binding.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extension #126 -->
 
 <xi:include href="ARB_ES3_compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
index 58cff9b60fa541485acf1089dfca40a26afd9884..922f0acafc2b1cdcccbace6f6a496535f653dba3 100644 (file)
@@ -854,12 +854,12 @@ const struct function gl_core_functions_possible[] = {
 // { "glDispatchComputeIndirect", 43, -1 },             // XXX: Add to xml
 // { "glCopyImageSubData", 43, -1 },                    // XXX: Add to xml
 // { "glTextureView", 43, -1 },                         // XXX: Add to xml
-// { "glBindVertexBuffer", 43, -1 },                    // XXX: Add to xml
-// { "glVertexAttribFormat", 43, -1 },                  // XXX: Add to xml
-// { "glVertexAttribIFormat", 43, -1 },                 // XXX: Add to xml
-// { "glVertexAttribLFormat", 43, -1 },                 // XXX: Add to xml
-// { "glVertexAttribBinding", 43, -1 },                 // XXX: Add to xml
-// { "glVertexBindingDivisor", 43, -1 },                // XXX: Add to xml
+   { "glBindVertexBuffer", 43, -1 },
+   { "glVertexAttribFormat", 43, -1 },
+   { "glVertexAttribIFormat", 43, -1 },
+   { "glVertexAttribLFormat", 43, -1 },
+   { "glVertexAttribBinding", 43, -1 },
+   { "glVertexBindingDivisor", 43, -1 },
 // { "glVertexArrayBindVertexBufferEXT", 43, -1 },      // XXX: Add to xml
 // { "glVertexArrayVertexAttribFormatEXT", 43, -1 },    // XXX: Add to xml
 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 },   // XXX: Add to xml
index e6997f4862ff03a4fae018fa3f60f07b5ef60d70..a705b6b9368ced25544b735924197446b5827c17 100644 (file)
@@ -1230,6 +1230,49 @@ _mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type)
 }
 
 
+/**
+ * GL_ARB_vertex_attrib_binding
+ */
+void GLAPIENTRY
+_mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
+                       GLsizei stride)
+{
+}
+
+
+void GLAPIENTRY
+_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
+                         GLboolean normalized, GLuint relativeOffset)
+{
+}
+
+
+void GLAPIENTRY
+_mesa_VertexAttribIFormat(GLuint attribIndex, GLint size, GLenum type,
+                          GLuint relativeOffset)
+{
+}
+
+
+void GLAPIENTRY
+_mesa_VertexAttribLFormat(GLuint attribIndex, GLint size, GLenum type,
+                          GLuint relativeOffset)
+{
+}
+
+
+void GLAPIENTRY
+_mesa_VertexAttribBinding(GLuint attribIndex, GLuint bindingIndex)
+{
+}
+
+
+void GLAPIENTRY
+_mesa_VertexBindingDivisor(GLuint bindingIndex, GLuint divisor)
+{
+}
+
+
 /**
  * Copy one client vertex array to another.
  */
index 7e611e8c7526970ea21e5297f078a12e591373ac..2b54fde983636fb71aef3476535b5674eadcc59c 100644 (file)
@@ -250,6 +250,29 @@ _mesa_VertexAttribDivisor(GLuint index, GLuint divisor);
 extern unsigned
 _mesa_primitive_restart_index(const struct gl_context *ctx, GLenum ib_type);
 
+extern void GLAPIENTRY
+_mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
+                       GLsizei stride);
+
+extern void GLAPIENTRY
+_mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
+                         GLboolean normalized, GLuint relativeOffset);
+
+extern void GLAPIENTRY
+_mesa_VertexAttribIFormat(GLuint attribIndex, GLint size, GLenum type,
+                          GLuint relativeOffset);
+
+extern void GLAPIENTRY
+_mesa_VertexAttribLFormat(GLuint attribIndex, GLint size, GLenum type,
+                          GLuint relativeOffset);
+
+extern void GLAPIENTRY
+_mesa_VertexAttribBinding(GLuint attribIndex, GLuint bindingIndex);
+
+extern void GLAPIENTRY
+_mesa_VertexBindingDivisor(GLuint bindingIndex, GLuint divisor);
+
+
 extern void
 _mesa_copy_client_array(struct gl_context *ctx,
                         struct gl_client_array *dst,