Re: [Piglit] [PATCH] util: Avoid asking GL to transpose the ortho_uniform matrix.

2017-06-26 Thread Brian Paul

On 06/26/2017 05:51 PM, Eric Anholt wrote:

 From the GLES2 spec:

 If the transpose parameter to any of the UniformMatrix* commands
 is not FALSE, an INVALID_VALUE error is generated, and no uniform
 values are changed.

Fixes spurious failures in draw-vertices-half-float_gles2.
---
  tests/util/piglit-util-gl.c | 10 +-
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 5ff13fedcf6e..5dc1bbc7d2fe 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -603,12 +603,12 @@ piglit_gen_ortho_uniform(GLint location, double l, double 
r, double b,
 double t, double n, double f)
  {
const GLfloat values[4][4] = {
-   { 2/(r-l),0,0,-(r+l)/(r-l) },
-   {0,2/(t-b), 0,-(t+b)/(t-b) },
-   {0,   0,-2/(f-n), -(f+n)/(f-n) },
-   {0,   0,0,  1  }
+   { 2/(r-l),  0,0,0 },
+   {0, 2/(t-b),  0,0 },
+   {0, 0,-2/(f-n), 0 },
+   { -(r+l)/(r-l), -(t+b)/(t-b), -(f+n)/(f-n), 1 }
};
-   glUniformMatrix4fv(location, 1, GL_TRUE, (const GLfloat *)values);
+   glUniformMatrix4fv(location, 1, GL_FALSE, (const GLfloat *)values);
  }





Reviewed-by: Brian Paul 

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] util: Avoid asking GL to transpose the ortho_uniform matrix.

2017-06-26 Thread Eric Anholt
From the GLES2 spec:

If the transpose parameter to any of the UniformMatrix* commands
is not FALSE, an INVALID_VALUE error is generated, and no uniform
values are changed.

Fixes spurious failures in draw-vertices-half-float_gles2.
---
 tests/util/piglit-util-gl.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index 5ff13fedcf6e..5dc1bbc7d2fe 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -603,12 +603,12 @@ piglit_gen_ortho_uniform(GLint location, double l, double 
r, double b,
 double t, double n, double f)
 {
const GLfloat values[4][4] = {
-   { 2/(r-l),0,0,-(r+l)/(r-l) },
-   {0,2/(t-b), 0,-(t+b)/(t-b) },
-   {0,   0,-2/(f-n), -(f+n)/(f-n) },
-   {0,   0,0,  1  }
+   { 2/(r-l),  0,0,0 },
+   {0, 2/(t-b),  0,0 },
+   {0, 0,-2/(f-n), 0 },
+   { -(r+l)/(r-l), -(t+b)/(t-b), -(f+n)/(f-n), 1 }
};
-   glUniformMatrix4fv(location, 1, GL_TRUE, (const GLfloat *)values);
+   glUniformMatrix4fv(location, 1, GL_FALSE, (const GLfloat *)values);
 }
 
 
-- 
2.11.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit