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 cbbf659..9c25387 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 69014c5..a2d914a 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 58cff9b..922f0ac 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 e6997f4..a705b6b 100644 (file)
@@ -1231,6 +1231,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.
  */
 void
index 7e611e8..2b54fde 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,