Re: [Piglit] [PATCH v3] polygon-line-aa test case added.

2014-09-09 Thread Iago Toral Quiroga
This has been hanging here for a while, so if nobody says otherwise I'd
like to push this next week.

Iago

On jue, 2014-06-12 at 09:00 +0200, Iago Toral Quiroga wrote:
 This tests correct rendering of polygons using antialised GL_LINE mode for one
 face and GL_FILL for the other one. On some Intel hardware at least this used
 to require special handling that has caused regressions in the past.
 
 The test checks that the GL_FILL face of the polygon renders properly.
 ---
 
 I don't see a reason why we could not run this concurrently with other tests,
 so added the test as concurrent. At least I did not spot anything wrong when
 running a piglit test run.
 
 Still, I am not sure about the exact requirements for this, I browsed a few
 tests that are added with add_plain_test that do not seem to do anything
 special either...
 
  tests/all.py |  1 +
  tests/bugs/CMakeLists.gl.txt |  1 +
  tests/bugs/polygon-line-aa.c | 95 
 
  3 files changed, 97 insertions(+)
  create mode 100644 tests/bugs/polygon-line-aa.c
 
 diff --git a/tests/all.py b/tests/all.py
 index 3830013..d59df6a 100644
 --- a/tests/all.py
 +++ b/tests/all.py
 @@ -714,6 +714,7 @@ add_plain_test(gl11, 'fdo10370')
  add_plain_test(gl11, 'fdo23489')
  add_plain_test(gl11, 'fdo23670-depth_test')
  add_plain_test(gl11, 'fdo23670-drawpix_stencil')
 +add_concurrent_test(gl11, 'polygon-line-aa')
  add_plain_test(gl11, 'r300-readcache')
  add_plain_test(gl11, 'tri-tex-crash')
  add_plain_test(gl11, 'vbo-buffer-unmap')
 diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
 index e24ec6b..8e112ae 100644
 --- a/tests/bugs/CMakeLists.gl.txt
 +++ b/tests/bugs/CMakeLists.gl.txt
 @@ -30,5 +30,6 @@ piglit_add_executable (fdo28551 fdo28551.c)
  piglit_add_executable (fdo31934 fdo31934.c)
  piglit_add_executable (tri-tex-crash tri-tex-crash.c)
  piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
 +piglit_add_executable (polygon-line-aa polygon-line-aa.c)
  
  # vim: ft=cmake:
 diff --git a/tests/bugs/polygon-line-aa.c b/tests/bugs/polygon-line-aa.c
 new file mode 100644
 index 000..ed45963
 --- /dev/null
 +++ b/tests/bugs/polygon-line-aa.c
 @@ -0,0 +1,95 @@
 +/* Copyright © 2014 Igalia S.L.
 + *
 + * Permission is hereby granted, free of charge, to any person obtaining a
 + * copy of this software and associated documentation files (the Software),
 + * to deal in the Software without restriction, including without limitation
 + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 + * and/or sell copies of the Software, and to permit persons to whom the
 + * Software is furnished to do so, subject to the following conditions:
 + *
 + * The above copyright notice and this permission notice (including the next
 + * paragraph) shall be included in all copies or substantial portions of the
 + * Software.
 + *
 + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 DEALINGS
 + * IN THE SOFTWARE.
 + */
 +
 +/**
 + * \file polygon-line-aa.c
 + * Test case for a special case of line antialiasing
 + * https://bugs.freedesktop.org/show_bug.cgi?id=78679
 + *
 + * This test renders a polygon using GL_LINE mode (with antialised lines)
 + * for one face of the polygon, and GL_FILL for the other face. For gen  6
 + * intel hardware this setup requires special handling that if not done
 + * correctly produces incorrect rendering of the GL_FILL face. This caused
 + * regressions in the past.
 + *
 + * Author: Iago Toral ito...@igalia.com
 + */
 +
 +#include piglit-util-gl-common.h
 +
 +PIGLIT_GL_TEST_CONFIG_BEGIN
 +
 +   config.supports_gl_compat_version = 10;
 +   config.window_width = 100;
 +   config.window_height = 100;
 +   config.window_visual = PIGLIT_GL_VISUAL_RGBA;
 +
 +PIGLIT_GL_TEST_CONFIG_END
 +
 +void
 +piglit_init(int argc, char **argv)
 +{
 +   /* This enables the case we want to test for */
 +   glEnable(GL_LINE_SMOOTH);
 +   glShadeModel(GL_SMOOTH);
 +   glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
 +   glLineWidth(1.5);
 +   glEnable(GL_BLEND);
 +   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 +   glPolygonMode(GL_BACK, GL_LINE);
 +
 +   glMatrixMode(GL_PROJECTION);
 +   glLoadIdentity();
 +   glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
 +
 +   glClearColor(1, 1, 1, 1);
 +}
 +
 +enum piglit_result
 +piglit_display(void)
 +{
 +   glClear(GL_COLOR_BUFFER_BIT);
 +
 +   glViewport(0, 0, piglit_width, piglit_height);
 +
 +   glMatrixMode(GL_MODELVIEW);
 +   glLoadIdentity();
 +
 +   glColor4f(0.0f, 0.0f, 1.0f, 1.0);
 +   glBegin(GL_QUADS);
 +  

Re: [Piglit] [PATCH v3 0/5] arb_gpu_shader5: tests to verify 'stream' layout qualifier

2014-09-09 Thread Iago Toral Quiroga
These tests has been in the list for a while and now that drivers are
starting to expose ARB_gpu_shader5 it would be nice to have these tests
for multi-stream included in the suite, so if nobody says otherwise we
would like to push them next week.

Iago

On mié, 2014-08-20 at 16:30 +0200, Samuel Iglesias Gonsalvez wrote:
 Hello,
 
 This is the third version of the patch series. I resend them to the
 mailing list as the second version got unreviewed for weeks and they
 needed to be rebased to master, fixed some issues (piglit-gl-util.h
 renaming) and other minor things.
 
 This version includes the following changes:
 
 * Fix coding style issues in every patch.
 * Use piglit-gl-util.h instead of piglit-gl-util-common.h
 * Add a new patch (last one of the series) that modifies a printf
 message output which was wrong in xfb-streams.c.
 
 Best regards,
 
 Sam
 
 P.S: I don't have push rights to piglit repository.
 
 Samuel Iglesias Gonsalvez (5):
   arb_gpu_shader5: add some compiler tests for stream qualifier
   arb_gpu_shader5: Add linker tests to verify 'stream' layout qualifier
   arb_gpu_shader5: Add execution test to verify 'stream' layout
 qualifier
   arb_gpu_shader5: Add new test emitstreamvertex_nodraw
   arb_gpu_shade5: fix output message in xfb-streams.c
 
  tests/all.py   |   5 +
  tests/spec/arb_gpu_shader5/CMakeLists.txt  |   3 +-
  tests/spec/arb_gpu_shader5/compiler/CMakeLists.txt |   3 +-
  .../compiler/stream-qualifier/CMakeLists.gl.txt|  12 +
  .../compiler/stream-qualifier/CMakeLists.txt   |   1 +
  .../correct-multiple-layout-qualifier-stream.geom  |  40 
  .../incorrect-in-layout-qualifier-stream.geom  |  19 ++
  ...ect-multiple-block-layout-qualifier-stream.geom |  32 +++
  ...incorrect-negative-layout-qualifier-stream.geom |  24 ++
  .../stream-qualifier/stream_value_too_large.c  | 192 
  .../arb_gpu_shader5/execution/CMakeLists.gl.txt|   2 +
  .../execution/emitstreamvertex_nodraw.c| 171 ++
  .../execution/xfb-streams-without-invocations.c| 250 
 +
  tests/spec/arb_gpu_shader5/execution/xfb-streams.c |   4 +-
  .../spec/arb_gpu_shader5/linker/CMakeLists.gl.txt  |  13 ++
  tests/spec/arb_gpu_shader5/linker/CMakeLists.txt   |   1 +
  .../linker/emitstreamvertex_stream_too_large.c | 133 +++
  .../linker/stream-different-zero-gs-fs.shader_test |  50 +
  .../linker/stream-invalid-prim-output.shader_test  |  54 +
  .../linker/stream-negative-value.shader_test   |  38 
  .../arb_gpu_shader5/linker/tf-wrong-stream-value.c | 116 ++
  21 files changed, 1159 insertions(+), 4 deletions(-)
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/CMakeLists.gl.txt
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/CMakeLists.txt
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/correct-multiple-layout-qualifier-stream.geom
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/incorrect-in-layout-qualifier-stream.geom
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/incorrect-multiple-block-layout-qualifier-stream.geom
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/incorrect-negative-layout-qualifier-stream.geom
  create mode 100644 
 tests/spec/arb_gpu_shader5/compiler/stream-qualifier/stream_value_too_large.c
  create mode 100644 
 tests/spec/arb_gpu_shader5/execution/emitstreamvertex_nodraw.c
  create mode 100644 
 tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c
  create mode 100644 tests/spec/arb_gpu_shader5/linker/CMakeLists.gl.txt
  create mode 100644 tests/spec/arb_gpu_shader5/linker/CMakeLists.txt
  create mode 100644 
 tests/spec/arb_gpu_shader5/linker/emitstreamvertex_stream_too_large.c
  create mode 100644 
 tests/spec/arb_gpu_shader5/linker/stream-different-zero-gs-fs.shader_test
  create mode 100644 
 tests/spec/arb_gpu_shader5/linker/stream-invalid-prim-output.shader_test
  create mode 100644 
 tests/spec/arb_gpu_shader5/linker/stream-negative-value.shader_test
  create mode 100644 tests/spec/arb_gpu_shader5/linker/tf-wrong-stream-value.c
 


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


Re: [Piglit] [PATCH v3] polygon-line-aa test case added.

2014-09-09 Thread Brian Paul

Two comments below.

-Brian

On 09/09/2014 03:23 AM, Iago Toral Quiroga wrote:

This has been hanging here for a while, so if nobody says otherwise I'd
like to push this next week.

Iago

On jue, 2014-06-12 at 09:00 +0200, Iago Toral Quiroga wrote:

This tests correct rendering of polygons using antialised GL_LINE mode for one
face and GL_FILL for the other one. On some Intel hardware at least this used
to require special handling that has caused regressions in the past.

The test checks that the GL_FILL face of the polygon renders properly.
---

I don't see a reason why we could not run this concurrently with other tests,
so added the test as concurrent. At least I did not spot anything wrong when
running a piglit test run.

Still, I am not sure about the exact requirements for this, I browsed a few
tests that are added with add_plain_test that do not seem to do anything
special either...

  tests/all.py |  1 +
  tests/bugs/CMakeLists.gl.txt |  1 +
  tests/bugs/polygon-line-aa.c | 95 


We're trying to avoid dumping tests in the bugs/ directory.  It looks to 
me like this could go into tests/spec/gl-1.0/


-Brian



  3 files changed, 97 insertions(+)
  create mode 100644 tests/bugs/polygon-line-aa.c

diff --git a/tests/all.py b/tests/all.py
index 3830013..d59df6a 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -714,6 +714,7 @@ add_plain_test(gl11, 'fdo10370')
  add_plain_test(gl11, 'fdo23489')
  add_plain_test(gl11, 'fdo23670-depth_test')
  add_plain_test(gl11, 'fdo23670-drawpix_stencil')
+add_concurrent_test(gl11, 'polygon-line-aa')
  add_plain_test(gl11, 'r300-readcache')
  add_plain_test(gl11, 'tri-tex-crash')
  add_plain_test(gl11, 'vbo-buffer-unmap')
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index e24ec6b..8e112ae 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -30,5 +30,6 @@ piglit_add_executable (fdo28551 fdo28551.c)
  piglit_add_executable (fdo31934 fdo31934.c)
  piglit_add_executable (tri-tex-crash tri-tex-crash.c)
  piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
+piglit_add_executable (polygon-line-aa polygon-line-aa.c)

  # vim: ft=cmake:
diff --git a/tests/bugs/polygon-line-aa.c b/tests/bugs/polygon-line-aa.c
new file mode 100644
index 000..ed45963
--- /dev/null
+++ b/tests/bugs/polygon-line-aa.c
@@ -0,0 +1,95 @@
+/* Copyright © 2014 Igalia S.L.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \file polygon-line-aa.c
+ * Test case for a special case of line antialiasing
+ * 
https://urldefense.proofpoint.com/v1/url?u=https://bugs.freedesktop.org/show_bug.cgi?id%3D78679k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0Am=roRaK%2BFkdlgSESjSCDC89XoeO%2FT29BWy6iHc6py2sIA%3D%0As=c3ed1b581616086c6f43f32cdd353e37060cd3a1a4d8ecdcaba30cd7be7304de
+ *
+ * This test renders a polygon using GL_LINE mode (with antialised lines)
+ * for one face of the polygon, and GL_FILL for the other face. For gen  6
+ * intel hardware this setup requires special handling that if not done
+ * correctly produces incorrect rendering of the GL_FILL face. This caused
+ * regressions in the past.
+ *
+ * Author: Iago Toral ito...@igalia.com
+ */
+
+#include piglit-util-gl-common.h
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 10;
+   config.window_width = 100;
+   config.window_height = 100;


Can you use the default window size?  Or use something larger?  Windows 
has problems with small sizes like this.




+   config.window_visual = PIGLIT_GL_VISUAL_RGBA;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+void
+piglit_init(int argc, char **argv)
+{
+   /* This enables the case we want to test for */
+   glEnable(GL_LINE_SMOOTH);
+   glShadeModel(GL_SMOOTH);
+   glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+   glLineWidth(1.5);
+   glEnable(GL_BLEND);
+   glBlendFunc 

[Piglit] [PATCH] glsl-1.20: new test for a GLSL scoping bug in Mesa

2014-09-09 Thread Marek Olšák
From: Marek Olšák marek.ol...@amd.com

Mesa things Name is a type in gl_Position = Name.
---
 .../compiler/scoping-struct-vs-variable.vert   | 24 ++
 1 file changed, 24 insertions(+)
 create mode 100644 
tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert

diff --git a/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert 
b/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert
new file mode 100644
index 000..2ab288b
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.20
+// check_link: true
+// [end config]
+//
+// GLSLangSpec.1.20.8, 4.2 Scoping:
+//
+// If a nested scope redeclares a name used in an outer scope, it hides all
+//  existing uses of that name. There is no way to access the hidden name or
+//  make it unhidden, without exiting the scope that hid it.
+
+#version 120
+
+struct Name {
+float a;
+};
+
+void main()
+{
+vec4 Name = vec4(1.0);
+gl_Position = Name;
+}
+
-- 
1.9.1

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


[Piglit] [PATCH 3/3] Remove all_cl profile

2014-09-09 Thread Tom Stellard
The test list that was provided by the all_cl can now be replicated with the
quick_cl profile by adding the 'individual' option to the opencv
section.
---
 tests/all_cl.py | 32 
 1 file changed, 32 deletions(-)
 delete mode 100644 tests/all_cl.py

diff --git a/tests/all_cl.py b/tests/all_cl.py
deleted file mode 100644
index ea48a7a..000
--- a/tests/all_cl.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2014 Advanced Micro Devices, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the Software),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-# Authors: Tom Stellard thomas.stell...@amd.com
-#
-
-from tests.cl import profile
-from framework.oclconform import add_oclconform_tests
-from framework.opencv import add_opencv_tests
-
-add_opencv_tests(profile)
-add_oclconform_tests(profile)
-- 
1.8.5.5

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


Re: [Piglit] [PATCH v3] polygon-line-aa test case added.

2014-09-09 Thread Iago Toral

Hi Paul, I'll make these two changes before pushing next week.
Thanks for reviewing this.

Iago

El 2014-09-09 16:23, Brian Paul escribió:

Two comments below.

-Brian

On 09/09/2014 03:23 AM, Iago Toral Quiroga wrote:
This has been hanging here for a while, so if nobody says otherwise 
I'd

like to push this next week.

Iago

On jue, 2014-06-12 at 09:00 +0200, Iago Toral Quiroga wrote:
This tests correct rendering of polygons using antialised GL_LINE 
mode for one
face and GL_FILL for the other one. On some Intel hardware at least 
this used

to require special handling that has caused regressions in the past.

The test checks that the GL_FILL face of the polygon renders 
properly.

---

I don't see a reason why we could not run this concurrently with 
other tests,
so added the test as concurrent. At least I did not spot anything 
wrong when

running a piglit test run.

Still, I am not sure about the exact requirements for this, I browsed 
a few
tests that are added with add_plain_test that do not seem to do 
anything

special either...

  tests/all.py |  1 +
  tests/bugs/CMakeLists.gl.txt |  1 +
  tests/bugs/polygon-line-aa.c | 95 



We're trying to avoid dumping tests in the bugs/ directory.  It looks
to me like this could go into tests/spec/gl-1.0/

-Brian



  3 files changed, 97 insertions(+)
  create mode 100644 tests/bugs/polygon-line-aa.c

diff --git a/tests/all.py b/tests/all.py
index 3830013..d59df6a 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -714,6 +714,7 @@ add_plain_test(gl11, 'fdo10370')
  add_plain_test(gl11, 'fdo23489')
  add_plain_test(gl11, 'fdo23670-depth_test')
  add_plain_test(gl11, 'fdo23670-drawpix_stencil')
+add_concurrent_test(gl11, 'polygon-line-aa')
  add_plain_test(gl11, 'r300-readcache')
  add_plain_test(gl11, 'tri-tex-crash')
  add_plain_test(gl11, 'vbo-buffer-unmap')
diff --git a/tests/bugs/CMakeLists.gl.txt 
b/tests/bugs/CMakeLists.gl.txt

index e24ec6b..8e112ae 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -30,5 +30,6 @@ piglit_add_executable (fdo28551 fdo28551.c)
  piglit_add_executable (fdo31934 fdo31934.c)
  piglit_add_executable (tri-tex-crash tri-tex-crash.c)
  piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
+piglit_add_executable (polygon-line-aa polygon-line-aa.c)

  # vim: ft=cmake:
diff --git a/tests/bugs/polygon-line-aa.c 
b/tests/bugs/polygon-line-aa.c

new file mode 100644
index 000..ed45963
--- /dev/null
+++ b/tests/bugs/polygon-line-aa.c
@@ -0,0 +1,95 @@
+/* Copyright © 2014 Igalia S.L.
+ *
+ * Permission is hereby granted, free of charge, to any person 
obtaining a
+ * copy of this software and associated documentation files (the 
Software),
+ * to deal in the Software without restriction, including without 
limitation
+ * the rights to use, copy, modify, merge, publish, distribute, 
sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom 
the
+ * Software is furnished to do so, subject to the following 
conditions:

+ *
+ * The above copyright notice and this permission notice (including 
the next
+ * paragraph) shall be included in all copies or substantial 
portions of the

+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO 
EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
OTHER DEALINGS

+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \file polygon-line-aa.c
+ * Test case for a special case of line antialiasing
+ * 
https://urldefense.proofpoint.com/v1/url?u=https://bugs.freedesktop.org/show_bug.cgi?id%3D78679k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0Am=roRaK%2BFkdlgSESjSCDC89XoeO%2FT29BWy6iHc6py2sIA%3D%0As=c3ed1b581616086c6f43f32cdd353e37060cd3a1a4d8ecdcaba30cd7be7304de

+ *
+ * This test renders a polygon using GL_LINE mode (with antialised 
lines)
+ * for one face of the polygon, and GL_FILL for the other face. For 
gen  6
+ * intel hardware this setup requires special handling that if not 
done
+ * correctly produces incorrect rendering of the GL_FILL face. This 
caused

+ * regressions in the past.
+ *
+ * Author: Iago Toral ito...@igalia.com
+ */
+
+#include piglit-util-gl-common.h
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 10;
+   config.window_width = 100;
+   config.window_height = 100;


Can you use the default window size?  Or use something larger?
Windows has problems with small sizes like this.



+   config.window_visual = PIGLIT_GL_VISUAL_RGBA;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+void
+piglit_init(int argc, char **argv)
+{
+   /* This enables the case we want to test 

[Piglit] [PATCH 1/3] opencv: Add 'individual' option to piglit.conf

2014-09-09 Thread Tom Stellard
This replaces the individual parameter in add_opencv_tests()
---
 framework/opencv.py |  3 ++-
 piglit.conf.example | 10 ++
 tests/all_cl.py |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/framework/opencv.py b/framework/opencv.py
index cefc94c..a5201c9 100644
--- a/framework/opencv.py
+++ b/framework/opencv.py
@@ -38,12 +38,13 @@ class OpenCVTest(GTest):
 GTest.__init__(self, options)
 
 
-def add_opencv_tests(profile, individual = False):
+def add_opencv_tests(profile):
 if not PIGLIT_CONFIG.has_option('opencv', 'opencv_test_ocl_bindir'):
 return
 
 opencv_test_ocl = path.join(PIGLIT_CONFIG.get('opencv',
 'opencv_test_ocl_bindir'), 'opencv_test_ocl')
+individual = PIGLIT_CONFIG.has_option('opencv', 'individual')
 if not path.isfile(opencv_test_ocl):
 print('Warning: {} does not exist.\nSkipping OpenCV '
   'tests...'.format(opencv_test_ocl))
diff --git a/piglit.conf.example b/piglit.conf.example
index e7a2101..9cb7dd1 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -2,6 +2,16 @@
 ; Set the opencv_test_ocl_bindir variable to run the OpenCV OpenCL tests.
 ;opencv_test_ocl_bindir=/home/user/opencv/build/bin
 ;opencv_workdir=/home/user/opencv/samples/c/
+; Run each subtest individiually to so a result is recored for each subtest.
+; For example, default behavior:
+; opencv/OCL_ML/Kmeans - Pass
+;
+; With 'individual' option:
+; OCL_ML/Kmeans.Mat/0 - Pass
+; OCL_ML/Kmeans.Mat/1 - Pass
+; OCL_ML/Kmeans.Mat/2 - Pass
+;
+;individual
 ;
 [xts]
 ; Set bindir equal to the root of the xts directory
diff --git a/tests/all_cl.py b/tests/all_cl.py
index 45de569..ea48a7a 100644
--- a/tests/all_cl.py
+++ b/tests/all_cl.py
@@ -28,5 +28,5 @@ from tests.cl import profile
 from framework.oclconform import add_oclconform_tests
 from framework.opencv import add_opencv_tests
 
-add_opencv_tests(profile, True)
+add_opencv_tests(profile)
 add_oclconform_tests(profile)
-- 
1.8.5.5

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


[Piglit] [PATCH 2/3] quick_cl: Add oclconform tests

2014-09-09 Thread Tom Stellard
---
 tests/quick_cl.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/quick_cl.py b/tests/quick_cl.py
index 17729b2..ea48a7a 100644
--- a/tests/quick_cl.py
+++ b/tests/quick_cl.py
@@ -25,6 +25,8 @@
 #
 
 from tests.cl import profile
+from framework.oclconform import add_oclconform_tests
 from framework.opencv import add_opencv_tests
 
 add_opencv_tests(profile)
+add_oclconform_tests(profile)
-- 
1.8.5.5

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


[Piglit] [PATCH] framework: add a generic timeout mechanism

2014-09-09 Thread Thomas Wood
The timeout mechanism within igt.py can no longer be used since
get_command_result was renamed and made private in commit 5e9dd69
(exectest.py: rename get_command_result to __run_command). Therefore,
move the timeout mechanism into exectest.py, allowing all test profiles
to use it if needed and also avoiding code duplication between igt.py
and exectest.py.

Cc: Dylan Baker baker.dyla...@gmail.com
Cc: Chad Versace chad.vers...@linux.intel.com
Signed-off-by: Thomas Wood thomas.w...@intel.com
---
 framework/exectest.py | 67 +++--
 framework/profile.py  |  3 +-
 tests/igt.py  | 93 +--
 3 files changed, 68 insertions(+), 95 deletions(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index 3ed9b6f..90920c6 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -29,6 +29,9 @@ import shlex
 import time
 import sys
 import traceback
+from datetime import datetime
+import threading
+import signal
 import itertools
 import abc
 try:
@@ -50,6 +53,45 @@ else:
 TEST_BIN_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__),
  '../bin'))
 
+# This class is for timing out tests that hang. Create an instance by passing
+# it a timeout in seconds and the Popen object that is running your test. Then
+# call the start method (inherited from Thread) to start the timer. The Popen
+# object is killed if the timeout is reached and it has not completed. Wait for
+# the outcome by calling the join() method from the parent.
+
+class ProcessTimeout(threading.Thread):
+def __init__(self, timeout, proc):
+threading.Thread.__init__(self)
+self.proc = proc
+self.timeout = timeout
+self.status = 0
+
+def run(self):
+start_time = datetime.now()
+delta = 0
+while (delta  self.timeout) and (self.proc.poll() is None):
+time.sleep(1)
+delta = (datetime.now() - start_time).total_seconds()
+
+# if the test is not finished after timeout, first try to terminate it
+# and if that fails, send SIGKILL to all processes in the test's
+# process group
+
+if self.proc.poll() is None:
+self.status = 1
+self.proc.terminate()
+time.sleep(5)
+
+if self.proc.poll() is None:
+self.status = 2
+if hasattr(os, 'killpg'):
+os.killpg(self.proc.pid, signal.SIGKILL)
+self.proc.wait()
+
+
+def join(self):
+threading.Thread.join(self)
+return self.status
 
 class Test(object):
  Abstract base class for Test classes
@@ -82,12 +124,14 @@ class Test(object):
 self.env = {}
 self.result = TestResult({'result': 'fail'})
 self.cwd = None
+self.timeout = 0
+self.__proc_timeout = None
 
 # This is a hook for doing some testing on execute right before
 # self.run is called.
 self._test_hook_execute_run = lambda: None
 
-def execute(self, path, log, dmesg):
+def execute(self, path, log, dmesg, timeout):
  Run a test
 
 Run a test, but with features. This times the test, uses dmesg checking
@@ -99,6 +143,7 @@ class Test(object):
 dmesg -- a dmesg.BaseDmesg derived class
 
 
+self.timeout = timeout
 log_current = log.pre_log(path if self.OPTS.verbose else None)
 
 # Run the test
@@ -199,6 +244,11 @@ class Test(object):
 # Test passed but has valgrind errors.
 self.result['result'] = 'fail'
 
+if self.timeout  0:
+# check for timeout
+if self.__proc_timeout.join()  0:
+self.result['result'] = 'timeout'
+
 def is_skip(self):
  Application specific check for skip
 
@@ -208,6 +258,10 @@ class Test(object):
 
 return False
 
+def __set_process_group(self):
+if hasattr(os, 'setpgrp'):
+os.setpgrp()
+
 def __run_command(self):
  Run the test command and get the result
 
@@ -240,7 +294,16 @@ class Test(object):
 stderr=subprocess.PIPE,
 cwd=self.cwd,
 env=fullenv,
-universal_newlines=True)
+universal_newlines=True,
+preexec_fn=self.__set_process_group)
+# create a ProcessTimeout object to watch out for test hang if the
+# process is still going after the timeout, then it will be killed
+# forcing the communicate function (which is a blocking call) to
+# return
+if self.timeout  0:
+self.__proc_timeout = ProcessTimeout(self.timeout, proc)
+self.__proc_timeout.start()
+
 out, err = proc.communicate()
 

Re: [Piglit] [PATCH] glsl-1.20: new test for a GLSL scoping bug in Mesa

2014-09-09 Thread Brian Paul

On 09/09/2014 08:51 AM, Marek Olšák wrote:

From: Marek Olšák marek.ol...@amd.com

Mesa things Name is a type in gl_Position = Name.


thinks



---
  .../compiler/scoping-struct-vs-variable.vert   | 24 ++
  1 file changed, 24 insertions(+)
  create mode 100644 
tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert

diff --git a/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert 
b/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert
new file mode 100644
index 000..2ab288b
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/scoping-struct-vs-variable.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.20
+// check_link: true
+// [end config]
+//
+// GLSLangSpec.1.20.8, 4.2 Scoping:
+//
+// If a nested scope redeclares a name used in an outer scope, it hides all
+//  existing uses of that name. There is no way to access the hidden name or
+//  make it unhidden, without exiting the scope that hid it.
+
+#version 120
+
+struct Name {
+float a;
+};
+
+void main()
+{
+vec4 Name = vec4(1.0);
+gl_Position = Name;
+}
+



Reviewed-by: Brian Paul bri...@vmware.com


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


[Piglit] [PATCH 1/2] cl: Add atomic_max tests

2014-09-09 Thread Aaron Watry
v2: Properly test signed/unsigned values

Signed-off-by: Aaron Watry awa...@gmail.com
---
 .../execute/builtin/atomic/atomic_max-local.cl | 81 ++
 1 file changed, 81 insertions(+)
 create mode 100644 tests/cl/program/execute/builtin/atomic/atomic_max-local.cl

diff --git a/tests/cl/program/execute/builtin/atomic/atomic_max-local.cl 
b/tests/cl/program/execute/builtin/atomic/atomic_max-local.cl
new file mode 100644
index 000..68b513f
--- /dev/null
+++ b/tests/cl/program/execute/builtin/atomic/atomic_max-local.cl
@@ -0,0 +1,81 @@
+/*!
+[config]
+name: atomic_max local
+clc_version_min: 11
+
+[test]
+name: simple int
+kernel_name: simple_int
+dimensions: 1
+global_size: 1 0 0
+local_size: 1 0 0
+arg_out: 0 buffer int[2] -1 2
+arg_in:  1 buffer int[1] NULL
+arg_in:  2 int   -1
+arg_in:  3 int2
+
+[test]
+name: simple uint
+kernel_name: simple_uint
+dimensions: 1
+global_size: 1 0 0
+local_size:  1 0 0
+arg_out: 0 buffer uint[2] 2 3
+arg_in:  1 buffer uint[1] NULL
+arg_in:  2 uint   2
+arg_in:  3 uint   3
+
+[test]
+name: simple uint 2
+kernel_name: simple_uint
+dimensions: 1
+global_size: 1 0 0
+local_size:  1 0 0
+arg_out: 0 buffer uint[2] 3 4294967295
+arg_in:  1 buffer uint[1] NULL
+arg_in:  2 uint   3
+arg_in:  3 uint   0x
+
+
+[test]
+name: threads
+kernel_name: threads_int
+dimensions: 1
+global_size: 8 0 0
+local_size:  8 0 0
+arg_out: 0 buffer int[1] 7
+arg_in:  1 buffer int[1] NULL
+
+[test]
+name: threads
+kernel_name: threads_uint
+dimensions: 1
+global_size: 8 0 0
+local_size:  8 0 0
+arg_out: 0 buffer uint[1] 7
+arg_in:  1 buffer uint[1] NULL
+
+!*/
+
+#define SIMPLE_TEST(TYPE) \
+kernel void simple_##TYPE(global TYPE *out, local TYPE *mem, TYPE initial, 
TYPE other) { \
+   *mem = initial; \
+   TYPE a = atomic_max(mem, other); \
+   out[0] = a; \
+   out[1] = *mem; \
+}
+
+#define THREADS_TEST(TYPE) \
+kernel void threads_##TYPE(global TYPE *out, local TYPE *mem) { \
+   *mem = 0; \
+   barrier(CLK_LOCAL_MEM_FENCE); \
+   atomic_max(mem, get_global_id(0)); \
+   barrier(CLK_LOCAL_MEM_FENCE); \
+   *out = *mem; \
+}
+
+SIMPLE_TEST(int)
+SIMPLE_TEST(uint)
+
+THREADS_TEST(int)
+THREADS_TEST(uint)
-- 
1.9.1

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


Re: [Piglit] [PATCH 00/11] Lots of UBO tests

2014-09-09 Thread Ian Romanick
On 09/09/2014 11:18 AM, Ian Romanick wrote:
 On 09/08/2014 02:34 PM, Ian Romanick wrote:
 A couple weeks ago I told Dave Airlie that I was working on a giant pile
 UBO tests.  This is not that work, but it is most of the changes to get
 ready for that work.  The first three patches were written quite some
 time ago while fixing bugs in Mesa's UBO code.  The remainder were
 developed while working on my UBO test generator script.

 The test generator script effort has been slowed by many bugs in various
 UBO implementations.  I have recently submitted several Mesa bugs
 (listed below) that were discovered by this work.

 https://bugs.freedesktop.org/show_bug.cgi?id=83468
 https://bugs.freedesktop.org/show_bug.cgi?id=83506
 https://bugs.freedesktop.org/show_bug.cgi?id=83508
 https://bugs.freedesktop.org/show_bug.cgi?id=83533

 I have also found numerous issues in NVIDIA's closed source driver:

 - Global layout qualifiers are ignored.

 layout(row_major) uniform;

 uniform U { mat4 m; }; // m will be column-major

 - Layout qualifiers on structures are ignored.

 struct S { mat4 m; };

 uniform U { layout(row_major) S s; }; // s.m will be column-major

 - Small structures are not padded to vec4-size.  See patch #8.

 It seems like there was a 4th bug, but I can't remember what it was.

I remember the other NVIDIA bug:

- The API reported type for a row-major mat4x3, for example, is
GL_FLOAT_MAT3x4 (instead of GL_FLOAT_MAT4x3).

 We've done some testing on AMD closed source drivers now, and we have
 found that they have a non-overlapping set of bugs.  Testing is a bit
 blocked on one bug:
 
 - Block members that are not used in the shader (e.g., active) are not
 reported by the GL API.
 
 This bug makes a very large number of tests fail.  I intentionally don't
 probe every member of ever block because... Mesa's GLSL compiler takes
 massive amounts of time linking those shaders.  I suspect the time may
 be in code generator or optimization passes.  Dunno yet.
 
 As a result, I don't have access to a correct implementation to verify
 my script... which generates random tests.  I have to scrutinize each
 failing test that is generated to determine whether the script or driver
 is at fault.  Anyway... should get something out RSN.

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


Re: [Piglit] [PATCH 07/11] arb_uniform_buffer_object: Add test based on extension spec

2014-09-09 Thread Ian Romanick
[Resend without the giant attachment that made the list angry.]

On 09/09/2014 11:19 AM, Ian Romanick wrote:
 On 09/08/2014 09:58 PM, Tapani Pälli wrote:
 Hi Ian;

 I was planning to have a 'custom' layout-std140 test with some doubles
 included. I think I will instead copy-paste this one and add doubles in
 to the mix. Is there any way I could introduce optional content in to
 this test when extension is present or should I rather make a copy of
 the whole test?
 
 I only included this test because it came directly from the specification.
 
 I don't think we'll need any hand written tests for fp64. :)  I've
 attached a sample test from the fully random test generator.  I think by
 using the directed mode we'll be able to generate all the tests we'll
 need.

http://people.freedesktop.org/~idr/test.shader_test

 Note: I haven't tested any of the fp64 support yet, so that test may be
 completely bogus.
 
 (I have some ubo fixes for double in my fp64_fixes Mesa tree but not
 yet tested)

 Thanks;

 // Tapani


 On 09/09/2014 12:34 AM, Ian Romanick wrote:
 From: Ian Romanick ian.d.roman...@intel.com

 This comes almost verbatim from the ARB_uniform_buffer_object spec.
 It's also mostly redundant with the layout-std140 test... which will be
 removed soon.

 This test passes on NVIDIA's closed source driver (version 331.89 on
 GTX260)

 Signed-off-by: Ian Romanick ian.d.roman...@intel.com
 ---
  .../example_from_spec.shader_test  | 218 
 +
  1 file changed, 218 insertions(+)
  create mode 100644 
 tests/spec/arb_uniform_buffer_object/example_from_spec.shader_test

 diff --git 
 a/tests/spec/arb_uniform_buffer_object/example_from_spec.shader_test 
 b/tests/spec/arb_uniform_buffer_object/example_from_spec.shader_test
 new file mode 100644
 index 000..b14b6a1
 --- /dev/null
 +++ b/tests/spec/arb_uniform_buffer_object/example_from_spec.shader_test
 @@ -0,0 +1,218 @@
 +[require]
 +GLSL = 1.30
 +GL_ARB_uniform_buffer_object
 +
 +[vertex shader]
 +#extension GL_ARB_uniform_buffer_object : require
 +
 +struct f_struct {
 +   int d;
 +   bvec2 e;
 +};
 +
 +struct o_struct {
 +   uvec3 j;
 +   vec2 k;
 +   float l[2];
 +   vec2 m;
 +   mat3 n[2];
 +};
 +
 +layout(std140) uniform Example { 
 + // Base types below consume 4 basic machine units
 + //
 + //   base   base  align
 + // rule  align  off.  off.  bytes used
 + //   --     ---
 +   float a;  //  1   4 000..3
 +   vec2 b;   //  2   8 488..15
 +   vec3 c;   //  3  1616   1616..27
 +   f_struct  //  9  1628   32(align begin)
 +// int d;//  1   432   3232..35
 +// bvec2 e;  //  2   836   4040..47
 +   f;//  9  1648   48(pad end)
 +   float g;  //  1   448   4848..51
 +   float h[2];   //  4  1652   6464..67 (h[0])
 + //  8080..83 (h[1])
 + //  4  1684   96(pad end of h)
 +   mat2x3 i; // 5/4 1696   9696..107 (i, column 0)
 + //  112112..123 (i, column 1)
 + // 5/4 16   124  128(pad end of i)
 +   o_struct  //  10 16   128  128(align begin)
 +// uvec3 j;  //  3  16   128  128128..139 (o[0].j)
 +// vec2 k;   //  2   8   140  144144..151 (o[0].k)
 +// float l[2];   //  4  16   152  160160..163 (o[0].l[0])
 + //   176176..179 (o[0].l[1])
 + //  4  16   180  192(pad end of o[0].l)
 +// vec2 m;   //  2   8   192  192192..199 (o[0].m)
 +// mat3 n[2];// 6/4 16   200  208208..219 (o[0].n[0], column 0)
 + //   224224..235 (o[0].n[0], column 1)
 + //   240240..251 (o[0].n[0], column 2)
 + //   256256..267 (o[0].n[1], column 0)
 + //   272272..283 (o[0].n[1], column 1)
 + //   288288..299 (o[0].n[1], column 2)
 + // 6/4 16   300  304(pad end of o[0].n)
 + //  9  16   304  304(pad end of o[0])
 + //  3  16   304  304304..315 (o[1].j)
 + //  2   8   316  320320..327 (o[1].k)
 + //  4  16   328  336336..347 (o[1].l[0])
 + //   352352..355 (o[1].l[1])
 + //  4  16   356  368(pad end of o[1].l)
 + //  2   8   368  368368..375 (o[1].m)
 + // 6/4 16   376  384384..395 (o[1].n[0], column 0)
 + //   400400..411 (o[1].n[0], column 1)
 + //

[Piglit] [PATCH v3 1/1] cl: Add copysign tests

2014-09-09 Thread Jan Vesely
v2: Fix -NaN test
v3: Rebase

Signed-off-by: Jan Vesely jan.ves...@rutgers.edu
---
 generated_tests/generate-cl-math-builtins.py | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/generated_tests/generate-cl-math-builtins.py 
b/generated_tests/generate-cl-math-builtins.py
index 11105a5..fcdcc94 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -24,7 +24,7 @@
 
 import os
 
-from genclbuiltins import gen
+from genclbuiltins import gen, NEGNAN
 from math import acos, asin, atan, atan2, fmod, pi, sin, sqrt, cos, fabs, tan, 
pow
 
 CLC_VERSION_MIN = {
@@ -33,6 +33,7 @@ CLC_VERSION_MIN = {
 'atan' : 10,
 'atan2' : 10,
 'ceil' : 10,
+'copysign' : 10,
 'cos' : 10,
 'fabs' : 10,
 'floor' : 10,
@@ -99,6 +100,15 @@ tests = {
 [0.5, -0.5, 0.0, -0.0, float(nan), -3.99]
 ]
 },
+'copysign' : {
+'arg_types': [F, F, F],
+'function_type': 'ttt',
+'values': [
+[0.0, -0.0, 1.0, -1.0, float(nan), float(nan), NEGNAN,   
float(-inf), float(inf) ], # Result
+[0.0,  0.0, 1.0, -1.0, float(nan), -4.0, float(nan), 
float(inf),  float(-inf) ], # Arg0
+[1.0, -1.0, 2.0, -2.0, float(nan), float(nan), -4.0, 
-3.0,  float(inf) ], # Arg1
+]
+},
 'cos' : {
 'arg_types' : [F, F],
 'function_type': 'ttt',
-- 
1.9.3

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


Re: [Piglit] [PATCH v3 1/1] cl: Add copysign tests

2014-09-09 Thread Aaron Watry
I gave this a spin on libclc + evergreen/si and also checked against a
geforce 9400m in my macbook.  Tests pass on all 3 systems tested.

Reviewed-by: Aaron Watry awa...@gmail.com

On Tue, Sep 9, 2014 at 6:34 PM, Jan Vesely jan.ves...@rutgers.edu wrote:
 v2: Fix -NaN test
 v3: Rebase

 Signed-off-by: Jan Vesely jan.ves...@rutgers.edu
 ---
  generated_tests/generate-cl-math-builtins.py | 12 +++-
  1 file changed, 11 insertions(+), 1 deletion(-)

 diff --git a/generated_tests/generate-cl-math-builtins.py 
 b/generated_tests/generate-cl-math-builtins.py
 index 11105a5..fcdcc94 100644
 --- a/generated_tests/generate-cl-math-builtins.py
 +++ b/generated_tests/generate-cl-math-builtins.py
 @@ -24,7 +24,7 @@

  import os

 -from genclbuiltins import gen
 +from genclbuiltins import gen, NEGNAN
  from math import acos, asin, atan, atan2, fmod, pi, sin, sqrt, cos, fabs, 
 tan, pow

  CLC_VERSION_MIN = {
 @@ -33,6 +33,7 @@ CLC_VERSION_MIN = {
  'atan' : 10,
  'atan2' : 10,
  'ceil' : 10,
 +'copysign' : 10,
  'cos' : 10,
  'fabs' : 10,
  'floor' : 10,
 @@ -99,6 +100,15 @@ tests = {
  [0.5, -0.5, 0.0, -0.0, float(nan), -3.99]
  ]
  },
 +'copysign' : {
 +'arg_types': [F, F, F],
 +'function_type': 'ttt',
 +'values': [
 +[0.0, -0.0, 1.0, -1.0, float(nan), float(nan), NEGNAN,   
 float(-inf), float(inf) ], # Result
 +[0.0,  0.0, 1.0, -1.0, float(nan), -4.0, float(nan), 
 float(inf),  float(-inf) ], # Arg0
 +[1.0, -1.0, 2.0, -2.0, float(nan), float(nan), -4.0, 
 -3.0,  float(inf) ], # Arg1
 +]
 +},
  'cos' : {
  'arg_types' : [F, F],
  'function_type': 'ttt',
 --
 1.9.3

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