glapi: Add infrastructure for ARB_multi_bind
authorFredrik Höglund <fredrik@kde.org>
Wed, 13 Nov 2013 18:02:10 +0000 (19:02 +0100)
committerFredrik Höglund <fredrik@kde.org>
Fri, 2 May 2014 00:53:25 +0000 (02:53 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
14 files changed:
src/mapi/glapi/gen/ARB_multi_bind.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/samplerobj.c
src/mesa/main/samplerobj.h
src/mesa/main/shaderimage.c
src/mesa/main/shaderimage.h
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/texobj.c
src/mesa/main/texobj.h
src/mesa/main/varray.c
src/mesa/main/varray.h

diff --git a/src/mapi/glapi/gen/ARB_multi_bind.xml b/src/mapi/glapi/gen/ARB_multi_bind.xml
new file mode 100644 (file)
index 0000000..4f2f2a2
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_multi_bind" number="147">
+
+    <function name="BindBuffersBase" offset="assign">
+        <param name="target" type="GLenum"/>
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="buffers" type="const GLuint *"/>
+    </function>
+
+    <function name="BindBuffersRange" offset="assign">
+        <param name="target" type="GLenum"/>
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="buffers" type="const GLuint *"/>
+        <param name="offsets" type="const GLintptr *"/>
+        <param name="sizes" type="const GLsizeiptr *"/>
+    </function>
+
+    <function name="BindTextures" offset="assign">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="textures" type="const GLuint *"/>
+    </function>
+
+    <function name="BindSamplers" offset="assign">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="samplers" type="const GLuint *"/>
+    </function>
+
+    <function name="BindImageTextures" offset="assign">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="textures" type="const GLuint *"/>
+    </function>
+
+    <function name="BindVertexBuffers" offset="assign">
+        <param name="first" type="GLuint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="buffers" type="const GLuint *"/>
+        <param name="offsets" type="const GLintptr *"/>
+        <param name="strides" type="const GLsizei *"/>
+    </function>
+
+</category>
+</OpenGLAPI>
index 6b932e73f2f0c817fa5c9c26871cd26ded0d63b9..35cf924da08fe357a891238fbdced16b31855e30 100644 (file)
@@ -133,6 +133,7 @@ API_XML = \
        ARB_internalformat_query.xml \
        ARB_invalidate_subdata.xml \
        ARB_map_buffer_range.xml \
+       ARB_multi_bind.xml \
        ARB_robustness.xml \
        ARB_sample_shading.xml \
        ARB_sampler_objects.xml \
index 9200cd68d7eef3df4b65abe34485c212f7aff0db..46640397bccc22c7e03165c81f2d01985b0820b3 100644 (file)
     </function>
 </category>
 
+<!-- ARB extensions #145...#146 -->
+
+<xi:include href="ARB_multi_bind.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- Non-ARB extensions sorted by extension number. -->
 
 <category name="GL_EXT_blend_color" number="2">
index 36acd64ce7076f02cf1a41812b91334ebd03b329..65fa740a438715381c8fdbc95500720d45df6a37 100644 (file)
@@ -2770,6 +2770,19 @@ _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer)
    }
 }
 
+void GLAPIENTRY
+_mesa_BindBuffersRange(GLenum target, GLuint first, GLsizei count,
+                       const GLuint *buffers,
+                       const GLintptr *offsets, const GLsizeiptr *sizes)
+{
+}
+
+void GLAPIENTRY
+_mesa_BindBuffersBase(GLenum target, GLuint first, GLsizei count,
+                      const GLuint *buffers)
+{
+}
+
 void GLAPIENTRY
 _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
                               GLsizeiptr length)
index c08c4fdf2af76c9478f1736f0d6e3013ac38e932..e1b2a565a9898653486e3eff86f46313cfcc343c 100644 (file)
@@ -209,6 +209,13 @@ _mesa_BindBufferRange(GLenum target, GLuint index,
 void GLAPIENTRY
 _mesa_BindBufferBase(GLenum target, GLuint index, GLuint buffer);
 
+void GLAPIENTRY
+_mesa_BindBuffersRange(GLenum target, GLuint first, GLsizei count,
+                       const GLuint *buffers,
+                       const GLintptr *offsets, const GLsizeiptr *sizes);
+void GLAPIENTRY
+_mesa_BindBuffersBase(GLenum target, GLuint first, GLsizei count,
+                      const GLuint *buffers);
 void GLAPIENTRY
 _mesa_InvalidateBufferSubData(GLuint buffer, GLintptr offset,
                               GLsizeiptr length);
index 4900d525680319111d925aae2514af0e19c866bb..575724049ab6bf46be1c2dac647d46ac0f885888 100644 (file)
@@ -285,6 +285,12 @@ _mesa_BindSampler(GLuint unit, GLuint sampler)
 }
 
 
+void GLAPIENTRY
+_mesa_BindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
+{
+}
+
+
 /**
  * Check if a coordinate wrap mode is legal.
  * \return GL_TRUE if legal, GL_FALSE otherwise
index c72b1cd8d89727659f3875dc28343e5d7d5943bd..7d80b383d740d3ab1b23e40804a9327bccaf081d 100644 (file)
@@ -81,6 +81,8 @@ _mesa_IsSampler(GLuint sampler);
 void GLAPIENTRY
 _mesa_BindSampler(GLuint unit, GLuint sampler);
 void GLAPIENTRY
+_mesa_BindSamplers(GLuint first, GLsizei count, const GLuint *samplers);
+void GLAPIENTRY
 _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param);
 void GLAPIENTRY
 _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
index d1e752d3df6bd88c91f02cb3a6608b6f08a7e1b6..f77f2c6c2bad45085f2c5b727a325a26b275e02a 100644 (file)
@@ -478,6 +478,11 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
                                    layer, access, format);
 }
 
+void GLAPIENTRY
+_mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+}
+
 void GLAPIENTRY
 _mesa_MemoryBarrier(GLbitfield barriers)
 {
index aaecc5d299489c27b6a72f70df22fed634fa4aa7..733ac774777fff6826125cd4ca03e64737e5cac2 100644 (file)
@@ -45,6 +45,9 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
                        GLboolean layered, GLint layer, GLenum access,
                        GLenum format);
 
+void GLAPIENTRY
+_mesa_BindImageTextures(GLuint first, GLsizei count, const GLuint *textures);
+
 void GLAPIENTRY
 _mesa_MemoryBarrier(GLbitfield barriers);
 
index 8ff975fe5ac581c7c66a968f27746e95a0ed8263..b777352a5f758acc45563f7bc8eb7519fdc315f3 100644 (file)
@@ -882,6 +882,14 @@ const struct function gl_core_functions_possible[] = {
    /* GL_ARB_internalformat_query */
    { "glGetInternalformativ", 30, -1 },
 
+   /* GL_ARB_multi_bind */
+   { "glBindBuffersBase", 44, -1 },
+   { "glBindBuffersRange", 44, -1 },
+   { "glBindTextures", 44, -1 },
+   { "glBindSamplers", 44, -1 },
+   { "glBindImageTextures", 44, -1 },
+   { "glBindVertexBuffers", 44, -1 },
+
    /* GL_KHR_debug/GL_ARB_debug_output */
    { "glPushDebugGroup", 11, -1 },
    { "glPopDebugGroup", 11, -1 },
index 43cf1c5c5a1085729fe04b56d8b24bee2fa777bc..38be9ee56dd536da17d6370cfd5627895b23a21b 100644 (file)
@@ -1373,6 +1373,12 @@ _mesa_BindTexture( GLenum target, GLuint texName )
 }
 
 
+void GLAPIENTRY
+_mesa_BindTextures(GLuint first, GLsizei count, const GLuint *textures)
+{
+}
+
+
 /**
  * Set texture priorities.
  * 
index a9de73fff83327ed9c47a553af1cd044eee75b35..25394b6195fdab9e33dfae69cc5f4489501cbfac 100644 (file)
@@ -176,6 +176,10 @@ extern void GLAPIENTRY
 _mesa_BindTexture( GLenum target, GLuint texture );
 
 
+extern void GLAPIENTRY
+_mesa_BindTextures( GLuint first, GLsizei count, const GLuint *textures );
+
+
 extern void GLAPIENTRY
 _mesa_PrioritizeTextures( GLsizei n, const GLuint *textures,
                           const GLclampf *priorities );
index 81f71f8265e8d8a726fcd532519fe031f6cf4333..d7dc2325879121ad636826355e94074b28a5db23 100644 (file)
@@ -1439,6 +1439,13 @@ _mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
 }
 
 
+void GLAPIENTRY
+_mesa_BindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers,
+                        const GLintptr *offsets, const GLsizei *strides)
+{
+}
+
+
 void GLAPIENTRY
 _mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
                          GLboolean normalized, GLuint relativeOffset)
index d10f78e64a30a57b0618c34debf2d2ad3e6b8d53..f94ebac992033b556524377ce4253d050a8dacb0 100644 (file)
@@ -306,6 +306,10 @@ extern void GLAPIENTRY
 _mesa_BindVertexBuffer(GLuint bindingIndex, GLuint buffer, GLintptr offset,
                        GLsizei stride);
 
+extern void GLAPIENTRY
+_mesa_BindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers,
+                        const GLintptr *offsets, const GLsizei *strides);
+
 extern void GLAPIENTRY
 _mesa_VertexAttribFormat(GLuint attribIndex, GLint size, GLenum type,
                          GLboolean normalized, GLuint relativeOffset);