[Mesa-dev] [PATCH 01/11] glapi: add ARB_gpu_shader_fp64

Dave Airlie airlied at gmail.com
Thu Aug 14 03:52:32 PDT 2014


From: Dave Airlie <airlied at redhat.com>

Just add the xml file covering this extension,
and dummy interface files in mesa, and fix up
sanity tests.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml | 143 +++++++++++++++++++++++++++++
 src/mapi/glapi/gen/Makefile.am             |   1 +
 src/mapi/glapi/gen/gl_API.xml              |   2 +
 src/mesa/main/tests/dispatch_sanity.cpp    |  36 ++++----
 src/mesa/main/uniforms.c                   |  95 +++++++++++++++++++
 src/mesa/main/uniforms.h                   |  43 +++++++++
 6 files changed, 302 insertions(+), 18 deletions(-)
 create mode 100644 src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml

diff --git a/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml b/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml
new file mode 100644
index 0000000..4f860ef
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_gpu_shader_fp64" number="89">
+
+    <function name="Uniform1d" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="x" type="GLdouble"/>
+    </function>
+
+    <function name="Uniform2d" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="x" type="GLdouble"/>
+        <param name="y" type="GLdouble"/>
+    </function>
+
+    <function name="Uniform3d" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="x" type="GLdouble"/>
+        <param name="y" type="GLdouble"/>
+        <param name="z" type="GLdouble"/>
+    </function>
+
+    <function name="Uniform4d" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="x" type="GLdouble"/>
+        <param name="y" type="GLdouble"/>
+        <param name="z" type="GLdouble"/>
+        <param name="w" type="GLdouble"/>
+    </function>
+
+    <function name="Uniform1dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="Uniform2dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="Uniform3dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="Uniform4dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix2dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix3dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix4dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix2x3dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix2x4dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix3x2dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix3x4dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix4x2dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="UniformMatrix4x3dv" offset="assign">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLdouble *"/>
+    </function>
+
+    <function name="GetUniformdv" offset="assign">
+        <param name="program" type="GLuint"/>
+        <param name="location" type="GLint"/>
+        <param name="params" type="GLdouble *"/>
+    </function>
+
+    <enum name="DOUBLE_VEC2"   value="0x8FFC"/>
+    <enum name="DOUBLE_VEC3"   value="0x8FFD"/>
+    <enum name="DOUBLE_VEC4"   value="0x8FFE"/>
+
+    <enum name="DOUBLE_MAT2"   value="0x8F46"/>
+    <enum name="DOUBLE_MAT3"   value="0x8F47"/>
+    <enum name="DOUBLE_MAT4"   value="0x8F48"/>
+    <enum name="DOUBLE_MAT2x3"   value="0x8F49"/>
+    <enum name="DOUBLE_MAT2x4"   value="0x8F4A"/>
+    <enum name="DOUBLE_MAT3x2"   value="0x8F4B"/>
+    <enum name="DOUBLE_MAT3x4"   value="0x8F4C"/>
+    <enum name="DOUBLE_MAT4x2"   value="0x8F4D"/>
+    <enum name="DOUBLE_MAT4x3"   value="0x8F4E"/>
+</category>
+
+</OpenGLAPI>
+
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 645def4..9471986 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -131,6 +131,7 @@ API_XML = \
 	ARB_framebuffer_object.xml \
 	ARB_geometry_shader4.xml \
 	ARB_get_program_binary.xml \
+	ARB_gpu_shader_fp64.xml \
 	ARB_gpu_shader5.xml \
 	ARB_instanced_arrays.xml \
 	ARB_internalformat_query.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 619717d..235b894 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8213,6 +8213,8 @@
 
 <xi:include href="ARB_gpu_shader5.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="ARB_gpu_shader_fp64.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="GL_ARB_transform_feedback3" number="94">
   <enum name="MAX_TRANSFORM_FEEDBACK_BUFFERS" value="0x8E70"/>
   <enum name="MAX_VERTEX_STREAMS"             value="0x8E71"/>
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 04fa86b..12fc0de 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -669,24 +669,24 @@ const struct function gl_core_functions_possible[] = {
    { "glVertexAttribP4uiv", 43, -1 },
    { "glDrawArraysIndirect", 43, -1 },
    { "glDrawElementsIndirect", 43, -1 },
-// { "glUniform1d", 43, -1 },                           // XXX: Add to xml
-// { "glUniform2d", 43, -1 },                           // XXX: Add to xml
-// { "glUniform3d", 43, -1 },                           // XXX: Add to xml
-// { "glUniform4d", 43, -1 },                           // XXX: Add to xml
-// { "glUniform1dv", 43, -1 },                          // XXX: Add to xml
-// { "glUniform2dv", 43, -1 },                          // XXX: Add to xml
-// { "glUniform3dv", 43, -1 },                          // XXX: Add to xml
-// { "glUniform4dv", 43, -1 },                          // XXX: Add to xml
-// { "glUniformMatrix2dv", 43, -1 },                    // XXX: Add to xml
-// { "glUniformMatrix3dv", 43, -1 },                    // XXX: Add to xml
-// { "glUniformMatrix4dv", 43, -1 },                    // XXX: Add to xml
-// { "glUniformMatrix2x3dv", 43, -1 },                  // XXX: Add to xml
-// { "glUniformMatrix2x4dv", 43, -1 },                  // XXX: Add to xml
-// { "glUniformMatrix3x2dv", 43, -1 },                  // XXX: Add to xml
-// { "glUniformMatrix3x4dv", 43, -1 },                  // XXX: Add to xml
-// { "glUniformMatrix4x2dv", 43, -1 },                  // XXX: Add to xml
-// { "glUniformMatrix4x3dv", 43, -1 },                  // XXX: Add to xml
-// { "glGetUniformdv", 43, -1 },                        // XXX: Add to xml
+   { "glUniform1d", 43, -1 },
+   { "glUniform2d", 43, -1 },
+   { "glUniform3d", 43, -1 },
+   { "glUniform4d", 43, -1 },
+   { "glUniform1dv", 43, -1 },
+   { "glUniform2dv", 43, -1 },
+   { "glUniform3dv", 43, -1 },
+   { "glUniform4dv", 43, -1 },
+   { "glUniformMatrix2dv", 43, -1 },
+   { "glUniformMatrix3dv", 43, -1 },
+   { "glUniformMatrix4dv", 43, -1 },
+   { "glUniformMatrix2x3dv", 43, -1 },
+   { "glUniformMatrix2x4dv", 43, -1 },
+   { "glUniformMatrix3x2dv", 43, -1 },
+   { "glUniformMatrix3x4dv", 43, -1 },
+   { "glUniformMatrix4x2dv", 43, -1 },
+   { "glUniformMatrix4x3dv", 43, -1 },
+   { "glGetUniformdv", 43, -1 },
 // { "glGetSubroutineUniformLocation", 43, -1 },        // XXX: Add to xml
 // { "glGetSubroutineIndex", 43, -1 },                  // XXX: Add to xml
 // { "glGetActiveSubroutineUniformiv", 43, -1 },        // XXX: Add to xml
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 0d0cbf5..6bd7e42 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -1324,3 +1324,98 @@ _mesa_GetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex,
       return;
    }
 }
+
+void GLAPIENTRY
+_mesa_Uniform1d(GLint location, GLdouble v0)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform2d(GLint location, GLdouble v0, GLdouble v1)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform3d(GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform4d(GLint location, GLdouble v0, GLdouble v1, GLdouble v2,
+                   GLdouble v3)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform1dv(GLint location, GLsizei count, const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform2dv(GLint location, GLsizei count, const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform3dv(GLint location, GLsizei count, const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_Uniform4dv(GLint location, GLsizei count, const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose,
+                          const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose,
+                          const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose,
+                          const GLdouble * value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
+
+void GLAPIENTRY
+_mesa_UniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value)
+{
+}
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index e7a370e..ea9f729 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -254,6 +254,49 @@ _mesa_GetActiveUniformsiv(GLuint program,
 void GLAPIENTRY
 _mesa_GetUniformiv(GLuint, GLint, GLint *);
 
+void GLAPIENTRY
+_mesa_Uniform1d(GLint, GLdouble);
+void GLAPIENTRY
+_mesa_Uniform2d(GLint, GLdouble, GLdouble);
+void GLAPIENTRY
+_mesa_Uniform3d(GLint, GLdouble, GLdouble, GLdouble);
+void GLAPIENTRY
+_mesa_Uniform4d(GLint, GLdouble, GLdouble, GLdouble, GLdouble);
+
+void GLAPIENTRY
+_mesa_Uniform1dv(GLint, GLsizei, const GLdouble *);
+void GLAPIENTRY
+_mesa_Uniform2dv(GLint, GLsizei, const GLdouble *);
+void GLAPIENTRY
+_mesa_Uniform3dv(GLint, GLsizei, const GLdouble *);
+void GLAPIENTRY
+_mesa_Uniform4dv(GLint, GLsizei, const GLdouble *);
+
+void GLAPIENTRY
+_mesa_UniformMatrix2dv(GLint, GLsizei, GLboolean, const GLdouble *);
+void GLAPIENTRY
+_mesa_UniformMatrix3dv(GLint, GLsizei, GLboolean, const GLdouble *);
+void GLAPIENTRY
+_mesa_UniformMatrix4dv(GLint, GLsizei, GLboolean, const GLdouble *);
+void GLAPIENTRY
+_mesa_UniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+void GLAPIENTRY
+_mesa_UniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+void GLAPIENTRY
+_mesa_UniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+void GLAPIENTRY
+_mesa_UniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+void GLAPIENTRY
+_mesa_UniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+void GLAPIENTRY
+_mesa_UniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose,
+                         const GLdouble *value);
+
 long
 _mesa_parse_program_resource_name(const GLchar *name,
                                   const GLchar **out_base_name_end);
-- 
1.9.3



More information about the mesa-dev mailing list