glapi: add definition of ARB_texture_storage_multisample
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 16 Feb 2013 09:02:00 +0000 (22:02 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 31 Mar 2013 09:19:28 +0000 (22:19 +1300)
Adds XML for the extension, dispatch_sanity enabling, and the two new
entrypoints. These are both implemented by calling the shared
teximagemultisample() with immutable=GL_TRUE.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mapi/glapi/gen/ARB_texture_storage_multisample.xml [new file with mode: 0644]
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/teximage.c
src/mesa/main/teximage.h

diff --git a/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml b/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml
new file mode 100644 (file)
index 0000000..ebd8965
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_texture_storage_multisample" number="141">
+
+   <function name="TexStorage2DMultisample" offset="assign">
+      <param name="target" type="GLenum"/>
+      <param name="samples" type="GLsizei"/>
+      <param name="internalformat" type="GLint"/>
+      <param name="width" type="GLsizei"/>
+      <param name="height" type="GLsizei"/>
+      <param name="fixedsamplelocations" type="GLboolean"/>
+   </function>
+
+   <function name="TexStorage3DMultisample" offset="assign">
+      <param name="target" type="GLenum"/>
+      <param name="samples" type="GLsizei"/>
+      <param name="internalformat" type="GLint"/>
+      <param name="width" type="GLsizei"/>
+      <param name="height" type="GLsizei"/>
+      <param name="depth" type="GLsizei"/>
+      <param name="fixedsamplelocations" type="GLboolean"/>
+   </function>
+
+</category>
+
+</OpenGLAPI>
index 75957dc7dbdedc5bcda1ed3cafa766a3e8f3d8ff..df9592477c2c29a389be68e26defb1304d3d167a 100644 (file)
 
 <xi:include href="ARB_texture_buffer_range.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<!-- 140. GL_ARB_texture_query_levels -->
+
+<xi:include href="ARB_texture_storage_multisample.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 3431dedc105db8599f4e54ad09b2eec5868dd222..ffd83fe54edcf4d514e5b05cd41d47f808ccb055 100644 (file)
@@ -895,8 +895,8 @@ const struct function gl_core_functions_possible[] = {
 // { "glShaderStorageBlockBinding", 43, -1 },           // XXX: Add to xml
    { "glTexBufferRange", 43, -1 },
 // { "glTextureBufferRangeEXT", 43, -1 },               // XXX: Add to xml
-// { "glTexStorage2DMultisample", 43, -1 },             // XXX: Add to xml
-// { "glTexStorage3DMultisample", 43, -1 },             // XXX: Add to xml
+   { "glTexStorage2DMultisample", 43, -1 },
+   { "glTexStorage3DMultisample", 43, -1 },
 // { "glTextureStorage2DMultisampleEXT", 43, -1 },      // XXX: Add to xml
 // { "glTextureStorage3DMultisampleEXT", 43, -1 },      // XXX: Add to xml
 
index d7de69b9e9922db856777fcdc4cf1bd12c19fb35..68e42a71f66bdb6f0eb866fbe9ca6fbb59b61c3f 100644 (file)
@@ -4346,3 +4346,23 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
    teximagemultisample(3, target, samples, internalformat,
          width, height, depth, fixedsamplelocations, GL_FALSE);
 }
+
+
+void GLAPIENTRY
+_mesa_TexStorage2DMultisample(GLenum target, GLsizei samples,
+                              GLint internalformat, GLsizei width,
+                              GLsizei height, GLboolean fixedsamplelocations)
+{
+   teximagemultisample(2, target, samples, internalformat,
+         width, height, 1, fixedsamplelocations, GL_TRUE);
+}
+
+void GLAPIENTRY
+_mesa_TexStorage3DMultisample(GLenum target, GLsizei samples,
+                              GLint internalformat, GLsizei width,
+                              GLsizei height, GLsizei depth,
+                              GLboolean fixedsamplelocations)
+{
+   teximagemultisample(3, target, samples, internalformat,
+         width, height, depth, fixedsamplelocations, GL_TRUE);
+}
index 744c47a8af6e3d3887b0491c5d03c0ab61a1f2af..cedd93383553d191a68bb94f97cbeee20426d006 100644 (file)
@@ -305,6 +305,17 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
                             GLsizei height, GLsizei depth,
                             GLboolean fixedsamplelocations);
 
+extern void GLAPIENTRY
+_mesa_TexStorage2DMultisample(GLenum target, GLsizei samples,
+                              GLint internalformat, GLsizei width,
+                              GLsizei height, GLboolean fixedsamplelocations);
+
+extern void GLAPIENTRY
+_mesa_TexStorage3DMultisample(GLenum target, GLsizei samples,
+                              GLint internalformat, GLsizei width,
+                              GLsizei height, GLsizei depth,
+                              GLboolean fixedsamplelocations);
+
 /*@}*/
 
 #ifdef __cplusplus