[Mesa-dev] [PATCH 1/5] mesa: Add GL_NV_non_square_matrices for OpenGL ES 2.x.

Rafal Mielniczuk rafal.mielniczuk2 at gmail.com
Wed Feb 26 10:34:42 PST 2014


es2api ABI-check was also updated to prevent make check failures in
searching for NV suffixed function names.

Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2 at gmail.com>
---
 src/mapi/es2api/ABI-check                     |  6 +++
 src/mapi/glapi/gen/NV_non_square_matrices.xml | 59 +++++++++++++++++++++++++++
 src/mapi/glapi/gen/es_EXT.xml                 |  3 ++
 src/mesa/main/tests/dispatch_sanity.cpp       | 19 ++++++---
 4 files changed, 81 insertions(+), 6 deletions(-)
 create mode 100644 src/mapi/glapi/gen/NV_non_square_matrices.xml

diff --git a/src/mapi/es2api/ABI-check b/src/mapi/es2api/ABI-check
index 4a61050..43254aa 100755
--- a/src/mapi/es2api/ABI-check
+++ b/src/mapi/es2api/ABI-check
@@ -257,13 +257,19 @@ glUniform4uiv
 glUniformBlockBinding
 glUniformMatrix2fv
 glUniformMatrix2x3fv
+glUniformMatrix2x3fvNV
 glUniformMatrix2x4fv
+glUniformMatrix2x4fvNV
 glUniformMatrix3fv
 glUniformMatrix3x2fv
+glUniformMatrix3x2fvNV
 glUniformMatrix3x4fv
+glUniformMatrix3x4fvNV
 glUniformMatrix4fv
 glUniformMatrix4x2fv
+glUniformMatrix4x2fvNV
 glUniformMatrix4x3fv
+glUniformMatrix4x3fvNV
 glUnmapBuffer
 glUnmapBufferOES
 glUseProgram
diff --git a/src/mapi/glapi/gen/NV_non_square_matrices.xml b/src/mapi/glapi/gen/NV_non_square_matrices.xml
new file mode 100644
index 0000000..7df4a5c
--- /dev/null
+++ b/src/mapi/glapi/gen/NV_non_square_matrices.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_NV_non_square_matrices" number="160">
+    <enum name="FLOAT_MAT2x3_NV"                   value="0x8B65"/>
+    <enum name="FLOAT_MAT2x4_NV"                   value="0x8B66"/>
+    <enum name="FLOAT_MAT3x2_NV"                   value="0x8B67"/>
+    <enum name="FLOAT_MAT3x4_NV"                   value="0x8B68"/>
+    <enum name="FLOAT_MAT4x2_NV"                   value="0x8B69"/>
+    <enum name="FLOAT_MAT4x3_NV"                   value="0x8B6A"/>
+
+    <function name="UniformMatrix2x3fvNV" alias="UniformMatrix2x3fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
+    </function>
+    <function name="UniformMatrix3x2fvNV" alias="UniformMatrix3x2fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
+    </function>
+    <function name="UniformMatrix2x4fvNV" alias="UniformMatrix2x4fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="6"/>
+    </function>
+    <function name="UniformMatrix4x2fvNV" alias="UniformMatrix4x2fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="8"/>
+    </function>
+    <function name="UniformMatrix3x4fvNV" alias="UniformMatrix3x4fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="12"/>
+    </function>
+    <function name="UniformMatrix4x3fvNV" alias="UniformMatrix4x3fv"
+              static_dispatch="false" es2="2.0">
+        <param name="location" type="GLint"/>
+        <param name="count" type="GLsizei" counter="true"/>
+        <param name="transpose" type="GLboolean"/>
+        <param name="value" type="const GLfloat *" count="count" count_scale="12"/>
+    </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index f412333..34466ad 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -837,4 +837,7 @@
     </function>
 </category>
 
+<!-- 121. GL_NV_non_square_matrices -->
+<xi:include href="NV_non_square_matrices.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 </OpenGLAPI>
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index d8969e2..b0cdb25 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -1283,6 +1283,12 @@ const struct function gles2_functions_possible[] = {
    { "glUniformMatrix2fv", 20, -1 },
    { "glUniformMatrix3fv", 20, -1 },
    { "glUniformMatrix4fv", 20, -1 },
+   { "glUniformMatrix2x3fvNV", 20, -1 },
+   { "glUniformMatrix3x2fvNV", 20, -1 },
+   { "glUniformMatrix2x4fvNV", 20, -1 },
+   { "glUniformMatrix4x2fvNV", 20, -1 },
+   { "glUniformMatrix3x4fvNV", 20, -1 },
+   { "glUniformMatrix4x3fvNV", 20, -1 },
    { "glUnmapBufferOES", 20, -1 },
    { "glUseProgram", 20, -1 },
    { "glValidateProgram", 20, -1 },
@@ -1409,12 +1415,13 @@ const struct function gles3_functions_possible[] = {
    { "glUniform4ui", 30, -1 },
    { "glUniform4uiv", 30, -1 },
    { "glUniformBlockBinding", 30, -1 },
-   { "glUniformMatrix2x3fv", 30, -1 },
-   { "glUniformMatrix2x4fv", 30, -1 },
-   { "glUniformMatrix3x2fv", 30, -1 },
-   { "glUniformMatrix3x4fv", 30, -1 },
-   { "glUniformMatrix4x2fv", 30, -1 },
-   { "glUniformMatrix4x3fv", 30, -1 },
+   // We check for the aliased -NV version in GLES 2
+   // { "glUniformMatrix2x3fv", 30, -1 },
+   // { "glUniformMatrix2x4fv", 30, -1 },
+   // { "glUniformMatrix3x2fv", 30, -1 },
+   // { "glUniformMatrix3x4fv", 30, -1 },
+   // { "glUniformMatrix4x2fv", 30, -1 },
+   // { "glUniformMatrix4x3fv", 30, -1 },
    // We check for the aliased -OES version in GLES 2
    // { "glUnmapBuffer", 30, -1 },
    { "glVertexAttribDivisor", 30, -1 },
-- 
1.9.0



More information about the mesa-dev mailing list