[Mesa-dev] [PATCH 1/4] mesa/main: add ARB_clear_texture entrypoints
Ilia Mirkin
imirkin at alum.mit.edu
Thu Mar 6 22:41:15 PST 2014
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Using void instead of GLvoid doesn't work -- the script that reads these xml
files doesn't know about it (at least in the const GLvoid * context)
src/mapi/glapi/gen/ARB_clear_texture.xml | 34 ++++++++++++++++++++++++++++++++
src/mapi/glapi/gen/gl_API.xml | 2 ++
src/mesa/main/extensions.c | 1 +
src/mesa/main/mtypes.h | 1 +
src/mesa/main/tests/dispatch_sanity.cpp | 4 ++++
src/mesa/main/teximage.c | 16 +++++++++++++++
src/mesa/main/teximage.h | 10 ++++++++++
7 files changed, 68 insertions(+)
create mode 100644 src/mapi/glapi/gen/ARB_clear_texture.xml
diff --git a/src/mapi/glapi/gen/ARB_clear_texture.xml b/src/mapi/glapi/gen/ARB_clear_texture.xml
new file mode 100644
index 0000000..bd9116f
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_clear_texture.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_clear_texture" number="145">
+
+ <enum name="CLEAR_TEXTURE" value="0x9365"/>
+
+ <function name ="ClearTexImage" offset="assign">
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="data" type="const GLvoid *"/>
+ </function>
+
+ <function name ="ClearTexSubImage" offset="assign">
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="data" type="const GLvoid *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 7e1946e..15f8e32 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8515,6 +8515,8 @@
</function>
</category>
+<xi:include href="ARB_clear_texture.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<!-- Non-ARB extensions sorted by extension number. -->
<category name="GL_EXT_blend_color" number="2">
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index a72284c..77da1eb 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -86,6 +86,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_buffer_storage", o(ARB_buffer_storage), GL, 2013 },
{ "GL_ARB_clear_buffer_object", o(dummy_true), GL, 2012 },
{ "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 },
+ { "GL_ARB_clear_texture", o(ARB_clear_texture), GL, 2013 },
{ "GL_ARB_compute_shader", o(ARB_compute_shader), GL, 2012 },
{ "GL_ARB_copy_buffer", o(dummy_true), GL, 2008 },
{ "GL_ARB_conservative_depth", o(ARB_conservative_depth), GL, 2011 },
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index d05649c..c5abab6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3491,6 +3491,7 @@ struct gl_extensions
GLboolean ARB_base_instance;
GLboolean ARB_blend_func_extended;
GLboolean ARB_buffer_storage;
+ GLboolean ARB_clear_texture;
GLboolean ARB_color_buffer_float;
GLboolean ARB_compute_shader;
GLboolean ARB_conservative_depth;
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index d1b0011..8690b5d 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -936,6 +936,10 @@ const struct function gl_core_functions_possible[] = {
/* GL_ARB_buffer_storage */
{ "glBufferStorage", 43, -1 },
+ /* GL_ARB_clear_texture */
+ { "glClearTexImage", 13, -1 },
+ { "glClearTexSubImage", 13, -1 },
+
{ NULL, 0, -1 }
};
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index a6c3581..2e671b0 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3794,6 +3794,22 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
x, y, width, height);
}
+void GLAPIENTRY
+_mesa_ClearTexSubImage( GLuint texture, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const void *data )
+{
+
+}
+
+void GLAPIENTRY
+_mesa_ClearTexImage( GLuint texture, GLint level,
+ GLenum format, GLenum type, const void *data )
+{
+
+}
+
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 51d94d1..f247d51 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -261,6 +261,16 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
extern void GLAPIENTRY
+_mesa_ClearTexSubImage( GLuint texture, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const void *data );
+
+extern void GLAPIENTRY
+_mesa_ClearTexImage( GLuint texture, GLint level,
+ GLenum format, GLenum type, const void *data );
+
+extern void GLAPIENTRY
_mesa_CompressedTexImage1D(GLenum target, GLint level,
GLenum internalformat, GLsizei width,
GLint border, GLsizei imageSize,
--
1.8.3.2
More information about the mesa-dev
mailing list