[Piglit] [PATCH] core: Catch all exceptions when collect_system_info() programs fail

2014-06-24 Thread Tom Stellard
Otherwise it is not possible to run piglit without X, because glxinfo
will requires a running X server.
---
 framework/core.py | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/framework/core.py b/framework/core.py
index de5afa0..af36d8c 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -125,12 +125,8 @@ def collect_system_info():
 try:
 result[name] = subprocess.check_output(command,
stderr=subprocess.STDOUT)
-except OSError as e:
-# If we get the 'no file or directory' error then pass, that means
-# that the binary isn't installed or isn't relavent to the system
-if e.errno != 2:
-raise
-
+except Exception as e:
+result[name] = 'Failed to run: %'.format(name)
 return result
 
 
-- 
1.8.1.5

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


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Kenneth Graunke
On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
 This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.
 
 The patch to be reverted breaks users of *BSD, solaris, and OSX which
 don't provide a python2 symlink, making it a regression.
 
 The patch however, fixes python for arch users whos python executable
 incorrectly is python3. This is a bug that Arch is not willing to fix.
 
 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261

I for one was happy to see the change to /usr/bin/python2, as it makes things 
easier for Arch Linux users.  There are a lot of Piglit users running Arch 
Linux, and AFAICT only a couple using BSD/Solaris/OSX.

Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have 
tried to use my Arch Linux box, and didn't realize they needed to work around 
this issue.  They were horribly confused until I explained how to fix it.

Let's look at the two failure modes:

1. Arch Linux with #! /usr/bin/env python

$ ./piglit-run.py tests/gpu results
Traceback (most recent call last):
  File ./piglit-run.py, line 30, in module
from framework.programs.run import run
  File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in 
module
import framework.core as core
  File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
import ConfigParser
ImportError: No module named 'ConfigParser'

This failure mode is incredibly cryptic.  The workaround is easy:
run python2 piglit-run.py tests/gpu results.  But it's not obvious.

2. BSD/OSX/Solaris with #! /usr/bin/env python2

$ ./piglit-run.py tests/gpu results
/usr/bin/env: python2: No such file or directory

This is incredibly clear, at least.  The workaround is both easy and obvious: 
put a python2 - python symlink anywhere in your path.  It doesn't even have 
to be installed system-wide - you can put it in ~/bin if you like.

For the record, I dislike that Arch has installed Python 3 as /usr/bin/python.  
It's incompatible and has caused no end of headaches for upstreams.  But, 
there's not a lot we can do about that.  Most systems have started installing 
python 2.x as both /usr/bin/python and /usr/bin/python2, which seems 
reasonable enough.

This is obviously a frustrating issue, but I hope the patch can stay.  Not 
particularly for my benefit (I know the workaround), but for other Arch users 
or for non-Arch people haplessly stuck using someone else's machine.

--Ken

signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ilia Mirkin
On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org wrote:
 On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
 This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.

 The patch to be reverted breaks users of *BSD, solaris, and OSX which
 don't provide a python2 symlink, making it a regression.

 The patch however, fixes python for arch users whos python executable
 incorrectly is python3. This is a bug that Arch is not willing to fix.

 bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261

 I for one was happy to see the change to /usr/bin/python2, as it makes things
 easier for Arch Linux users.  There are a lot of Piglit users running Arch
 Linux, and AFAICT only a couple using BSD/Solaris/OSX.

 Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have
 tried to use my Arch Linux box, and didn't realize they needed to work around
 this issue.  They were horribly confused until I explained how to fix it.

 Let's look at the two failure modes:

 1. Arch Linux with #! /usr/bin/env python

 $ ./piglit-run.py tests/gpu results
 Traceback (most recent call last):
   File ./piglit-run.py, line 30, in module
 from framework.programs.run import run
   File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in
 module
 import framework.core as core
   File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
 import ConfigParser
 ImportError: No module named 'ConfigParser'

 This failure mode is incredibly cryptic.  The workaround is easy:
 run python2 piglit-run.py tests/gpu results.  But it's not obvious.

Easy enough to throw in a test into __init__.py checking the python
version... if it's != 2, abort, telling them that their system is
broken.


 2. BSD/OSX/Solaris with #! /usr/bin/env python2

 $ ./piglit-run.py tests/gpu results
 /usr/bin/env: python2: No such file or directory

 This is incredibly clear, at least.  The workaround is both easy and obvious:
 put a python2 - python symlink anywhere in your path.  It doesn't even have
 to be installed system-wide - you can put it in ~/bin if you like.

 For the record, I dislike that Arch has installed Python 3 as /usr/bin/python.
 It's incompatible and has caused no end of headaches for upstreams.  But,
 there's not a lot we can do about that.

Isn't there? Refuse to go along with the idiocy until Arch fixes it or
people stop using it...

  -ilia

  Most systems have started installing
 python 2.x as both /usr/bin/python and /usr/bin/python2, which seems
 reasonable enough.


 This is obviously a frustrating issue, but I hope the patch can stay.  Not
 particularly for my benefit (I know the workaround), but for other Arch users
 or for non-Arch people haplessly stuck using someone else's machine.

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

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


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ilia Mirkin
On Tue, Jun 24, 2014 at 11:53 AM, Kenneth Graunke kenn...@whitecape.org wrote:
 On Tuesday, June 24, 2014 11:27:13 AM Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org
 wrote:
  On Friday, June 20, 2014 12:04:01 AM Dylan Baker wrote:
  This reverts commit 40b5d5288991fec2cc76ea4af7050555be467126.
 
  The patch to be reverted breaks users of *BSD, solaris, and OSX which
  don't provide a python2 symlink, making it a regression.
 
  The patch however, fixes python for arch users whos python executable
  incorrectly is python3. This is a bug that Arch is not willing to fix.
 
  bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80261
 
  I for one was happy to see the change to /usr/bin/python2, as it makes
 things
  easier for Arch Linux users.  There are a lot of Piglit users running Arch
  Linux, and AFAICT only a couple using BSD/Solaris/OSX.
 
  Recently, a bunch of my coworkers who are Debian/Fedora/Gentoo users have
  tried to use my Arch Linux box, and didn't realize they needed to work
 around
  this issue.  They were horribly confused until I explained how to fix it.
 
  Let's look at the two failure modes:
 
  1. Arch Linux with #! /usr/bin/env python
 
  $ ./piglit-run.py tests/gpu results
  Traceback (most recent call last):
File ./piglit-run.py, line 30, in module
  from framework.programs.run import run
File /home/kwg/Projects/piglit/framework/programs/run.py, line 30, in
  module
  import framework.core as core
File /home/kwg/Projects/piglit/framework/core.py, line 32, in module
  import ConfigParser
  ImportError: No module named 'ConfigParser'
 
  This failure mode is incredibly cryptic.  The workaround is easy:
  run python2 piglit-run.py tests/gpu results.  But it's not obvious.

 Easy enough to throw in a test into __init__.py checking the python
 version... if it's != 2, abort, telling them that their system is
 broken.

 Yeah, that would be nice.  Maybe that's the solution.

  2. BSD/OSX/Solaris with #! /usr/bin/env python2
 
  $ ./piglit-run.py tests/gpu results
  /usr/bin/env: python2: No such file or directory
 
  This is incredibly clear, at least.  The workaround is both easy and
 obvious:
  put a python2 - python symlink anywhere in your path.  It doesn't even
 have
  to be installed system-wide - you can put it in ~/bin if you like.
 
  For the record, I dislike that Arch has installed Python 3 as
 /usr/bin/python.
  It's incompatible and has caused no end of headaches for upstreams.  But,
  there's not a lot we can do about that.

 Isn't there? Refuse to go along with the idiocy until Arch fixes it or
 people stop using it...

   -ilia

 The idiocy has been going on for 4 years now - if they had any intention of
 changing back, they would've done it by now.

Perhaps it's because people have been too accommodating?

 People aren't likely to change
 their whole Linux distribution over a single symlink, either.  Boycotting
 isn't a solution.

It's definitely *a* solution. Certainly my preferred one, but perhaps not yours.


 I still think that this patch makes Piglit more convenient for a wider cross-
 section of our users, even if it is a stupid problem.

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


Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Ian Romanick
On 06/24/2014 10:08 AM, Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick i...@freedesktop.org wrote:
 On 06/24/2014 08:27 AM, Ilia Mirkin wrote:
 On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke kenn...@whitecape.org 
 wrote:
 For the record, I dislike that Arch has installed Python 3 as 
 /usr/bin/python.
 It's incompatible and has caused no end of headaches for upstreams.  But,
 there's not a lot we can do about that.

 Isn't there? Refuse to go along with the idiocy until Arch fixes it or
 people stop using it...

 What you're suggesting is called pissing in the wind.  Not generally
 producitve.  At some point you just have to get work done.
 
 So that strategy works for Arch but not for us?

Ask the question: Who is hurt by the stubborness of an Arch boycott?

It certainly won't hurt Arch, and it has approximately epsilon
probability of making them change.

It certainly will hurt some piglit developers that encounter Arch systems.

We're only hurting our own community... hence my original analogy.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] Time to switch to Python 3 already?

2014-06-24 Thread Matt Turner
It was more than a year ago now [1] that we agreed to hold these
patches back for a short time (maybe a month) to give people time to
get ready for the transition

In the mean time, we've struggled with Python 2.7 regressions and
dealt with many this breaks with Python 2.6 comments. Is it time to
finally stop?

RHEL people seemed to want to continue with Python 2.7 support. Time
to make a 2.7 branch that you guys can maintain on your own without
causing problems for Mesa developers using piglit every day?

[1] http://lists.freedesktop.org/archives/piglit/2013-April/005402.html
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] core.py: Add additional catch to collect_system_info()

2014-06-24 Thread Dylan Baker
Catch subprocess.CalledProcessError, which is an exception that
subprocess.check_call() raises if the binary returns a non 0 status.
The usual culprit for this is glxinfo on systems not running X

Signed-off-by: Dylan Baker baker.dyla...@gmail.com
---

Tom,

I'm not a fan of catching exceptions in such a blanket manner, even if
in this case it probably is fine. I think it's better to catch the
specific exception and pass.

 framework/core.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/framework/core.py b/framework/core.py
index de5afa0..675b7aa 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -130,6 +130,10 @@ def collect_system_info():
 # that the binary isn't installed or isn't relavent to the system
 if e.errno != 2:
 raise
+except subprocess.CalledProcessError:
+# If the binary is installed by doesn't work on the window system
+# (glxinfo) it will raise this error. go on
+pass
 
 return result
 
-- 
2.0.0

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


[Piglit] [PATCH] arb_arrays_of_arrays: fix required extensions

2014-06-24 Thread Timothy Arceri
Signed-off-by: Timothy Arceri t_arc...@yahoo.com.au
---
 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert  | 3 +--
 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert  | 3 +--
 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert  | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-array-array-var.vert | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert| 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-array-var-array.vert | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-array-var-array2.vert| 3 +--
 .../compiler/initializer-dec-list-type-array-array-var1-var2.vert  | 3 +--
 .../initializer-dec-list-type-array-var1-array-var2-array.vert | 3 +--
 .../initializer-dec-list-type-var1-array-array-var2-array-array.vert   | 3 +--
 .../compiler/initializer-struct-field-array-array-var.vert | 3 +--
 .../compiler/initializer-struct-field-array-var-array.vert | 3 +--
 .../compiler/initializer-struct-field-array-var-array2.vert| 3 +--
 .../initializer-struct-field-dec-list-array-array-var1-var2.vert   | 3 +--
 .../initializer-struct-field-dec-list-array-var1-array-var2.vert   | 3 +--
 .../initializer-struct-field-dec-list-array-var1-var2-array.vert   | 3 +--
 .../compiler/initializer-struct-field-var-array-array.vert | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-three-dimensions.vert| 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-three-dimensions2.vert   | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-var-array-array.vert | 3 +--
 .../arb_arrays_of_arrays/compiler/initializer-var-array-array2.vert| 3 +--
 21 files changed, 21 insertions(+), 42 deletions(-)

diff --git 
a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert 
b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert
index 23da9ce..4c848fb 100644
--- a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert
+++ b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert
@@ -1,8 +1,7 @@
 /* [config]
  * expect_result: fail
  * glsl_version: 1.20
- * require_extensions: GL_ARB_arrays_of_arrays
- * require_extensions: GL_ARB_shading_language_420pack
+ * require_extensions: GL_ARB_arrays_of_arrays GL_ARB_shading_language_420pack
  * [end config]
  */
 #version 120
diff --git 
a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert 
b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert
index 412088f..a21bbe8 100644
--- a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert
+++ b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert
@@ -1,8 +1,7 @@
 /* [config]
  * expect_result: fail
  * glsl_version: 1.20
- * require_extensions: GL_ARB_arrays_of_arrays
- * require_extensions: GL_ARB_shading_language_420pack
+ * require_extensions: GL_ARB_arrays_of_arrays GL_ARB_shading_language_420pack
  * [end config]
  */
 #version 120
diff --git 
a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert 
b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert
index 4c32e97..ecfaaba 100644
--- a/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert
+++ b/tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert
@@ -1,8 +1,7 @@
 /* [config]
  * expect_result: fail
  * glsl_version: 1.20
- * require_extensions: GL_ARB_arrays_of_arrays
- * require_extensions: GL_ARB_shading_language_420pack
+ * require_extensions: GL_ARB_arrays_of_arrays GL_ARB_shading_language_420pack
  * [end config]
  */
 #version 120
diff --git 
a/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var.vert 
b/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var.vert
index 993bf60..f940c56 100644
--- a/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var.vert
+++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var.vert
@@ -1,8 +1,7 @@
 /* [config]
  * expect_result: pass
  * glsl_version: 1.20
- * require_extensions: GL_ARB_arrays_of_arrays
- * require_extensions: GL_ARB_shading_language_420pack
+ * require_extensions: GL_ARB_arrays_of_arrays GL_ARB_shading_language_420pack
  * [end config]
  */
 #version 120
diff --git 
a/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert 
b/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert
index 7e77f3e..db7cfdd 100644
--- a/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert
+++ b/tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert
@@ -1,8 +1,7 @@
 /* [config]
  * expect_result: pass
  * glsl_version: 1.20
- * require_extensions: GL_ARB_arrays_of_arrays
- * require_extensions: GL_ARB_shading_language_420pack
+ * require_extensions: GL_ARB_arrays_of_arrays GL_ARB_shading_language_420pack
  * [end config]
  */
 #version 

Re: [Piglit] [PATCH] Revert python: change she-bang to python2

2014-06-24 Thread Chad Versace
On Mon, Jun 23, 2014 at 05:36:13PM -0700, Dylan Baker wrote:
 Chad, you mentioned you had comments on this patch?

Right, I commented on the Bugzilla ticket.
https://bugs.freedesktop.org/show_bug.cgi?id=80261
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] ARB_explicit_attrib_location: Remove commas from require_extensions line.

2014-06-24 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz

On Wed, Jun 25, 2014 at 9:23 AM, Matt Turner matts...@gmail.com wrote:
 ---
  tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag | 2 +-
  tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

 diff --git 
 a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag 
 b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag
 index 541e075..2b187f2 100644
 --- a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag
 +++ b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-12.frag
 @@ -1,7 +1,7 @@
  // [config]
  // expect_result: pass
  // glsl_version: 1.10
 -// require_extensions: GL_ARB_explicit_attrib_location, 
 GL_ARB_blend_func_extended
 +// require_extensions: GL_ARB_explicit_attrib_location 
 GL_ARB_blend_func_extended
  // [end config]
  //
  // Even though the specified locations overlap, the spec says that a *link*
 diff --git 
 a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag 
 b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
 index 246d45f..2be0403 100644
 --- a/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
 +++ b/tests/spec/arb_explicit_attrib_location/1.10/compiler/layout-13.frag
 @@ -1,7 +1,7 @@
  // [config]
  // expect_result: pass
  // glsl_version: 1.10
 -// require_extensions: GL_ARB_explicit_attrib_location, 
 GL_ARB_blend_func_extended
 +// require_extensions: GL_ARB_explicit_attrib_location 
 GL_ARB_blend_func_extended
  // [end config]
  //
  // Even though the specified locations overlap, the spec says that a *link*
 --
 1.8.3.2

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


[Piglit] [PATCH 1/1] cl: generated store: reduce the number of elements to 4

2014-06-24 Thread Jan Vesely
8 ulong16 crashes r600.

Signed-off-by: Jan Vesely jan.ves...@rutgers.edu
---

Crashing on lack of resources is probably not the intended behavior.

 generated_tests/cl/store/store-kernels-global.inc |  4 
 generated_tests/generate-cl-store-tests.py| 18 +-
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/generated_tests/cl/store/store-kernels-global.inc 
b/generated_tests/cl/store/store-kernels-global.inc
index b6220d0..5f5bf86 100644
--- a/generated_tests/cl/store/store-kernels-global.inc
+++ b/generated_tests/cl/store/store-kernels-global.inc
@@ -9,10 +9,6 @@ kernel void store_global(global type_t *out, global type_t 
*in) {
out[1] = in[1];
out[2] = in[2];
out[3] = in[3];
-   out[4] = in[4];
-   out[5] = in[5];
-   out[6] = in[6];
-   out[7] = in[7];
 }
 
 kernel void store_global_wi(global type_t *out, global type_t *in) {
diff --git a/generated_tests/generate-cl-store-tests.py 
b/generated_tests/generate-cl-store-tests.py
index 5a09985..4179271 100644
--- a/generated_tests/generate-cl-store-tests.py
+++ b/generated_tests/generate-cl-store-tests.py
@@ -36,8 +36,8 @@ if not os.path.exists(dirName):
 os.makedirs(dirName)
 
 
-def gen_array(size):
-return ' '.join([str(i) for i in xrange(size * 8)])
+def gen_array(size, count):
+return ' '.join([str(i) for i in xrange(size * count)])
 
 def ext_req(type_name):
 if type_name[:6] == double:
@@ -77,15 +77,15 @@ for t in TYPES:
 name: global address space
 global_size: 1 0 0
 kernel_name: store_global
-arg_out: 0 buffer {type_name}[8] {gen_array}
-arg_in:  1 buffer {type_name}[8] {gen_array}
+arg_out: 0 buffer {type_name}[4] {gen_array}
+arg_in:  1 buffer {type_name}[4] {gen_array}
 [test]
 name: global address space work items
-global_size: 8 0 0
+global_size: 4 0 0
 kernel_name: store_global_wi
-arg_out: 0 buffer {type_name}[8] {gen_array}
-arg_in:  1 buffer {type_name}[8] {gen_array}
-.format(type_name=type_name, gen_array=gen_array(size
+arg_out: 0 buffer {type_name}[4] {gen_array}
+arg_in:  1 buffer {type_name}[4] {gen_array}
+.format(type_name=type_name, gen_array=gen_array(size, 4
 
 f.close()
 
@@ -98,6 +98,6 @@ for t in TYPES:
 kernel_name: store_local
 arg_out: 0 buffer {type_name}[8] {gen_array}
 arg_in:  1 buffer {type_name}[8] {gen_array}
-.format(type_name=type_name, gen_array=gen_array(size
+.format(type_name=type_name, gen_array=gen_array(size, 8
 
 f.close()
-- 
1.9.3

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


[Piglit] Piglit build fails: NameError: global name 'fake_whitespace' is not defined

2014-06-24 Thread Tom Stellard
Hi,

Building piglit fails for me with HEAD at
7e699cdb47f328206afa6dd454de8d6f28d7ffe9

Here is the error:

[  0%] Generating tests/util/piglit-dispatch-gen.c,
tests/util/piglit-dispatch-gen.h, tests/util/piglit-util-gl-enum-gen.c
debug: registry.gl: etree is xml.etree.cElementTree
debug: registry.gl: _etree_iterfind wraps ElementTree.iterfind
Traceback (most recent call last):
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 201, in
module
main()
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 68, in
main
DispatchCode.emit(args.out_dir, gl_registry)
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 93, in
emit
render_template(cls.H_TEMPLATE, out_dir, **context_vars)
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 127, in
render_template
template.render_context(ctx)
  File /usr/lib/python2.7/site-packages/mako/template.py, line 325, in
render_context
**kwargs)
  File /usr/lib/python2.7/site-packages/mako/runtime.py, line 692, in
_render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File /usr/lib/python2.7/site-packages/mako/runtime.py, line 718, in
_exec_template
callable_(context, *args, **kwargs)
  File _home_tstellar_piglit_tests_util_piglit_dispatch_gen_h_mako,
line 147, in render_body
  File _home_tstellar_piglit_tests_util_piglit_dispatch_gen_h_mako,
line 123, in __M_anon_26
NameError: global name 'fake_whitespace' is not defined

Does anyone know what is wrong?

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


Re: [Piglit] Piglit build fails: NameError: global name 'fake_whitespace' is not defined

2014-06-24 Thread Dylan Baker
just saw that. Glad you got it working

On Tuesday, June 24, 2014 08:43:49 PM Tom Stellard wrote:
 On Tue, Jun 24, 2014 at 08:34:37PM -0400, Tom Stellard wrote:
  On Tue, Jun 24, 2014 at 05:29:44PM -0700, Dylan Baker wrote:
   what does: python -c 'import mako; print mako.__version__'
   return?
  
  $ python -c 'import mako; print mako.__version__'
  0.5.0
 
 chadv showed me how to update mako on IRC, so this is working for me now
 with version 1.0.  He said he would add a check for this to cmake.
 
 -Tom
 
  -Tom
  
   On Tuesday, June 24, 2014 08:27:54 PM Tom Stellard wrote:
Hi,

Building piglit fails for me with HEAD at
7e699cdb47f328206afa6dd454de8d6f28d7ffe9

Here is the error:

[  0%] Generating tests/util/piglit-dispatch-gen.c,
tests/util/piglit-dispatch-gen.h, tests/util/piglit-util-gl-enum-gen.c
debug: registry.gl: etree is xml.etree.cElementTree
debug: registry.gl: _etree_iterfind wraps ElementTree.iterfind

Traceback (most recent call last):
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 201,
  in

module

main()
  
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 68, in

main

DispatchCode.emit(args.out_dir, gl_registry)
  
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 93, in

emit

render_template(cls.H_TEMPLATE, out_dir, **context_vars)
  
  File /home/tstellar/piglit/tests/util/gen_dispatch.py, line 127,
  in

render_template

template.render_context(ctx)
  
  File /usr/lib/python2.7/site-packages/mako/template.py, line 325,
  in

render_context

**kwargs)
  
  File /usr/lib/python2.7/site-packages/mako/runtime.py, line 692,
  in

_render_context

_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  
  File /usr/lib/python2.7/site-packages/mako/runtime.py, line 718,
  in

_exec_template

callable_(context, *args, **kwargs)
  
  File _home_tstellar_piglit_tests_util_piglit_dispatch_gen_h_mako,

line 147, in render_body

  File _home_tstellar_piglit_tests_util_piglit_dispatch_gen_h_mako,

line 123, in __M_anon_26
NameError: global name 'fake_whitespace' is not defined

Does anyone know what is wrong?

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


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] results.py: Fix JSONWriter.close_json()

2014-06-24 Thread Dylan Baker
This bug was caused by calling close_dict() too many times for
piglit-run (but the correct number of times for piglit-resume), the
solution is to actually count the number of open dicts and close them
until the stack is empty

Signed-off-by: Dylan Baker baker.dyla...@gmail.com
cc: t...@stellard.net
cc: imir...@alum.mit.edu

Ilia, Do you have a better suggestion, you weren't thrilled with this
implementation the first time around, but it definately solves the
problem that Tom is seeing here:
http://www.fpaste.org/112839/65782414/
which is caused becuase run and resume do different things after the
tests finish running.
---

 framework/results.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/framework/results.py b/framework/results.py
index 43c1736..13f7c0c 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -170,9 +170,9 @@ class JSONWriter(object):
 containers that are still open and closes the file
 
 
-self.close_dict()
-self.close_dict()
-assert self._open_containers == []
+for x in self._open_containers:
+if x == 'dict':
+self.close_dict()
 
 self.file.close()
 
-- 
2.0.0

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


[Piglit] [Patch v2] results.py: Fix JSONWriter.close_json()

2014-06-24 Thread Dylan Baker
A previous patch created a bug which caused an AssertionError at the end
of a piglit run. This bug is the result of calling
JSONWriter.close_dict() too many times. This solution is to split the
start of the test dict out of initialize_json() and do it in the calling
function instead.

v2: - take this approach rather than close dicts as a stack

Signed-off-by: Dylan Baker baker.dyla...@gmail.com
---
 framework/programs/run.py | 6 ++
 framework/results.py  | 4 
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/framework/programs/run.py b/framework/programs/run.py
index eea0a60..bd9bd2e 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -170,6 +170,9 @@ def run(input_):
 json_writer.initialize_json(options, results.name,
 core.collect_system_info())
 
+json_writer.write_dict_key('tests')
+json_writer.open_dict()
+
 profile = framework.profile.merge_test_profiles(args.test_profile)
 profile.results_dir = args.results_path
 
@@ -217,6 +220,9 @@ def resume(input_):
 json_writer.initialize_json(results.options, results.name,
 core.collect_system_info())
 
+json_writer.write_dict_key('tests')
+json_writer.open_dict()
+
 for key, value in results.tests.iteritems():
 json_writer.write_dict_item(key, value)
 opts.exclude_tests.add(key)
diff --git a/framework/results.py b/framework/results.py
index 43c1736..1a6a652 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -160,9 +160,6 @@ class JSONWriter(object):
 for key, value in env.iteritems():
 self.write_dict_item(key, value)
 
-self.write_dict_key('tests')
-self.open_dict()
-
 def close_json(self):
  End json serialization and cleanup
 
@@ -171,7 +168,6 @@ class JSONWriter(object):
 
 
 self.close_dict()
-self.close_dict()
 assert self._open_containers == []
 
 self.file.close()
-- 
2.0.0

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


Re: [Piglit] Time to switch to Python 3 already?

2014-06-24 Thread Kenneth Graunke
On Tuesday, June 24, 2014 10:30:56 AM Matt Turner wrote:
 It was more than a year ago now [1] that we agreed to hold these
 patches back for a short time (maybe a month) to give people time to
 get ready for the transition
 
 In the mean time, we've struggled with Python 2.7 regressions and
 dealt with many this breaks with Python 2.6 comments. Is it time to
 finally stop?

Yes, please.  Python 3.0 came out 5.5 years ago.  Every major Linux 
distribution includes Python 3.x, and from what I've heard it's even 
installable in community repositories for enterprise distributions.  It's 
easily installable on Windows.

We suggested waiting about a month, and it's been a year.  It's time.

Making a tag or a branch prior to the switch seems reasonable to me.

 RHEL people seemed to want to continue with Python 2.7 support. Time
 to make a 2.7 branch that you guys can maintain on your own without
 causing problems for Mesa developers using piglit every day?
 
 [1] http://lists.freedesktop.org/archives/piglit/2013-April/005402.html

signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] glsl-1.10: Test reductions of integer vectors

2014-06-24 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com

Mesa has an optimization that converts expressions like v.x + v.y + v.z
+ v.w into dot(v, 1.0).  And therein lies the rub: the other operand to
the dot-product is always a float... even if the vector is an ivec or
uvec.  The result is not pretty:

shader_runner: ../../src/glsl/ir_builder.cpp:257: ir_expression* 
ir_builder::dot(ir_builder::operand, ir_builder::operand): Assertion 
`a.val-type == b.val-type' failed.
Aborted (core dumped)

NOTE: This test currently fails on Mesa.

Signed-off-by: Ian Romanick ian.d.roman...@intel.com
Cc: Matt Turner matts...@gmail.com
---
 .../execution/vs-integer-reduction.shader_test | 28 ++
 1 file changed, 28 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/vs-integer-reduction.shader_test

diff --git a/tests/spec/glsl-1.10/execution/vs-integer-reduction.shader_test 
b/tests/spec/glsl-1.10/execution/vs-integer-reduction.shader_test
new file mode 100644
index 000..b30337b
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/vs-integer-reduction.shader_test
@@ -0,0 +1,28 @@
+[require]
+GLSL = 1.10
+
+[vertex shader]
+uniform ivec4 v;
+varying vec4 color;
+
+void main()
+{
+   int i = v.x + v.y + v.z + v.w;
+
+   color = (i == 27) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1);
+   gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+varying vec4 color;
+
+void main()
+{
+   gl_FragColor = color;
+}
+
+[test]
+uniform ivec4 v -2 -1 25 5
+
+draw rect -1 -1 2 2
+probe all rgba 0 1 0 1
-- 
1.8.1.4

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