Re: [Piglit] [PATCH 0/3] arb_gpu_shader5: tests to verify 'stream' layout qualifier
On Fri, 2014-06-20 at 17:02 +0200, Samuel Iglesias Gonsalvez wrote: > Hello, > > This batch of patches adds tests for testing the layout's qualifier > called 'stream' which was introduced in ARB_gpu_shader5 extension. > > Each patch adds tests in different directories: compiler, linker and > execution under tests/spec/arb_gpu_shader5/ > > There is one test (xfb-streams-no-invocations.c) which is based on the s/xfb-streams-no-invocations/xfb-streams-without-invocations > previous work by Jordan (xfb-stream). The difference is that this test > only checks for transform feedback's multiple vertex stream support but > without invocations. > > Thanks, > > Sam > > Samuel Iglesias Gonsalvez (3): > 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 > > tests/all.py | 4 + > 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 | 193 > .../arb_gpu_shader5/execution/CMakeLists.gl.txt| 1 + > .../execution/xfb-streams-without-invocations.c| 248 > + > .../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 ++ > 19 files changed, 983 insertions(+), 2 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/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 > 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 v3] arb_fragment_layer_viewport: simple write tests
Reviewed-by: Chris Forbes On Wed, Jun 25, 2014 at 2:32 PM, Ilia Mirkin wrote: > With no layered fb and unconfigured viewports, the values of > gl_Layer/gl_ViewportIndex shouldn't matter for rendering. Make sure that > they're being passed through correctly from GS to FS. (Out-of-range > values may have undefined results for viewports, so only test with valid > values.) > > Similarly add tests that write layer/viewport in VS to make sure it > appears properly in FS (as well as what happens when there's an > intervening GS). > > Signed-off-by: Ilia Mirkin > --- > > v1 -> v2: > - use passthrough vertex shader > - changed tests to be 4 draws instead of 5, drawing each into separate >quadrants and doing one check at the end. should make it easier to identify >issues > - added a vs test that uses AMD_vertex_shader_layer (tested using softpipe) > > v2 -> v3: > - only use valid viewport ids (even though all the hw appears to render with >it properly, it's undefined in opengl) > - add AMD_vertex_shader_viewport_index tests (totally untested, no mesa >support at all) > - add versions of AMD_vertex_shader_* where there's an intervening GS which >is specified to just throw away the VS values (but softpipe asserts) > > .../layer-gs-write-simple.shader_test | 53 + > .../layer-vs-gs-write-simple.shader_test | 64 + > .../layer-vs-write-gs-no-write-simple.shader_test | 63 + > .../layer-vs-write-simple.shader_test | 48 > .../viewport-gs-write-simple.shader_test | 55 ++ > .../viewport-vs-gs-write-simple.shader_test| 66 > ++ > ...iewport-vs-write-gs-no-write-simple.shader_test | 62 > .../viewport-vs-write-simple.shader_test | 48 > 8 files changed, 459 insertions(+) > create mode 100644 > tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/layer-vs-write-gs-no-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/viewport-vs-gs-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/viewport-vs-write-gs-no-write-simple.shader_test > create mode 100644 > tests/spec/arb_fragment_layer_viewport/viewport-vs-write-simple.shader_test > > diff --git > a/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test > b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test > new file mode 100644 > index 000..bfafcb1 > --- /dev/null > +++ b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test > @@ -0,0 +1,53 @@ > +[require] > +GLSL >= 1.50 > +GL_ARB_fragment_layer_viewport > + > +[vertex shader passthrough] > + > +[geometry shader] > +#version 150 > + > +layout(triangles) in; > +layout(triangle_strip, max_vertices=3) out; > +uniform int layer; > + > +void main() > +{ > + for (int i = 0; i < 3; i++) { > + gl_Position = gl_in[i].gl_Position; > + gl_Layer = layer; > + EmitVertex(); > + } > +} > + > +[fragment shader] > +#version 150 > +#extension GL_ARB_fragment_layer_viewport: require > + > +uniform int layer; > + > +void main() > +{ > + if (gl_Layer == layer) > + gl_FragColor = vec4(0,1,0,0); > + else > + gl_FragColor = vec4(1,0,0,0); > +} > + > +[test] > +clear color 0.0 0.0 0.0 0.0 > +clear > + > +uniform int layer 0 > +draw rect -1 -1 1 1 > + > +uniform int layer 1 > +draw rect 0 -1 1 1 > + > +uniform int layer 1 > +draw rect -1 0 1 1 > + > +uniform int layer -1 > +draw rect 0 0 1 1 > + > +probe all rgb 0.0 1.0 0.0 > diff --git > a/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test > b/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test > new file mode 100644 > index 000..aab8a5b > --- /dev/null > +++ > b/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test > @@ -0,0 +1,64 @@ > +[require] > +GLSL >= 1.50 > +GL_ARB_fragment_layer_viewport > +GL_AMD_vertex_shader_layer > + > +[vertex shader] > +#version 140 > +#extension GL_AMD_vertex_shader_layer: enable > +in vec4 piglit_vertex; > +uniform int layer; > + > +void main() > +{ > + gl_Position = piglit_vertex; > + gl_Layer = layer + 1; > +} > + > +[geometry shader] > +#version 150 > + > +layout(triangles) in; > +layout(triangle_strip, max_vertices=3) out; > +uniform int layer; > + > +void main() > +{ > + for (int i = 0; i < 3; i++) { > +
[Piglit] [PATCH v3] arb_fragment_layer_viewport: simple write tests
With no layered fb and unconfigured viewports, the values of gl_Layer/gl_ViewportIndex shouldn't matter for rendering. Make sure that they're being passed through correctly from GS to FS. (Out-of-range values may have undefined results for viewports, so only test with valid values.) Similarly add tests that write layer/viewport in VS to make sure it appears properly in FS (as well as what happens when there's an intervening GS). Signed-off-by: Ilia Mirkin --- v1 -> v2: - use passthrough vertex shader - changed tests to be 4 draws instead of 5, drawing each into separate quadrants and doing one check at the end. should make it easier to identify issues - added a vs test that uses AMD_vertex_shader_layer (tested using softpipe) v2 -> v3: - only use valid viewport ids (even though all the hw appears to render with it properly, it's undefined in opengl) - add AMD_vertex_shader_viewport_index tests (totally untested, no mesa support at all) - add versions of AMD_vertex_shader_* where there's an intervening GS which is specified to just throw away the VS values (but softpipe asserts) .../layer-gs-write-simple.shader_test | 53 + .../layer-vs-gs-write-simple.shader_test | 64 + .../layer-vs-write-gs-no-write-simple.shader_test | 63 + .../layer-vs-write-simple.shader_test | 48 .../viewport-gs-write-simple.shader_test | 55 ++ .../viewport-vs-gs-write-simple.shader_test| 66 ++ ...iewport-vs-write-gs-no-write-simple.shader_test | 62 .../viewport-vs-write-simple.shader_test | 48 8 files changed, 459 insertions(+) create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-vs-write-gs-no-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/viewport-vs-gs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/viewport-vs-write-gs-no-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/viewport-vs-write-simple.shader_test diff --git a/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test new file mode 100644 index 000..bfafcb1 --- /dev/null +++ b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test @@ -0,0 +1,53 @@ +[require] +GLSL >= 1.50 +GL_ARB_fragment_layer_viewport + +[vertex shader passthrough] + +[geometry shader] +#version 150 + +layout(triangles) in; +layout(triangle_strip, max_vertices=3) out; +uniform int layer; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = gl_in[i].gl_Position; + gl_Layer = layer; + EmitVertex(); + } +} + +[fragment shader] +#version 150 +#extension GL_ARB_fragment_layer_viewport: require + +uniform int layer; + +void main() +{ + if (gl_Layer == layer) + gl_FragColor = vec4(0,1,0,0); + else + gl_FragColor = vec4(1,0,0,0); +} + +[test] +clear color 0.0 0.0 0.0 0.0 +clear + +uniform int layer 0 +draw rect -1 -1 1 1 + +uniform int layer 1 +draw rect 0 -1 1 1 + +uniform int layer 1 +draw rect -1 0 1 1 + +uniform int layer -1 +draw rect 0 0 1 1 + +probe all rgb 0.0 1.0 0.0 diff --git a/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test b/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test new file mode 100644 index 000..aab8a5b --- /dev/null +++ b/tests/spec/arb_fragment_layer_viewport/layer-vs-gs-write-simple.shader_test @@ -0,0 +1,64 @@ +[require] +GLSL >= 1.50 +GL_ARB_fragment_layer_viewport +GL_AMD_vertex_shader_layer + +[vertex shader] +#version 140 +#extension GL_AMD_vertex_shader_layer: enable +in vec4 piglit_vertex; +uniform int layer; + +void main() +{ + gl_Position = piglit_vertex; + gl_Layer = layer + 1; +} + +[geometry shader] +#version 150 + +layout(triangles) in; +layout(triangle_strip, max_vertices=3) out; +uniform int layer; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = gl_in[i].gl_Position; + gl_Layer = layer; + EmitVertex(); + } +} + +[fragment shader] +#version 150 +#extension GL_ARB_fragment_layer_viewport: require + +uniform int layer; + +void main() +{ + if (gl_Layer == layer) + gl_FragColor = vec4(0,1,0,0); + else + gl_FragColor = vec4(1,0,0,0
Re: [Piglit] [PATCH] glsl-1.10: Test reductions of integer vectors
Reviewed-by: Matt Turner ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] glsl-1.10: Test reductions of integer vectors
From: Ian Romanick 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 Cc: Matt Turner --- .../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
Re: [Piglit] [Patch v2] results.py: Fix JSONWriter.close_json()
On Tue, Jun 24, 2014 at 06:20:46PM -0700, Dylan Baker wrote: > 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 > Tested-by: Tom Stellard > Signed-off-by: Dylan Baker > --- > 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 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [Patch v2] results.py: Fix JSONWriter.close_json()
On Tue, Jun 24, 2014 at 9:20 PM, Dylan Baker wrote: > 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 Reviewed-by: Ilia Mirkin > --- > 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 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Time to switch to Python 3 already?
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 v2] results.py: Fix JSONWriter.close_json()
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 --- 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
[Piglit] [PATCH] results.py: Fix JSONWriter.close_json()
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 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
Re: [Piglit] Piglit build fails: NameError: global name 'fake_whitespace' is not defined
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 > > > > > > > > > > > > > > > > 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
Re: [Piglit] Piglit build fails: NameError: global name 'fake_whitespace' is not defined
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 > > > > > > 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 ___ 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
mako 0.5 is pretty old and it's known to not work in summary generation, or at least Ian had problems with it. I know gentoo considers 0.7.3 stable, and there are .9 and 1.0 branches as well idr: can you build mesa master right now? On Tuesday, June 24, 2014 08:34:37 PM 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 > > -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 > > > > > > > > > > > > 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 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] Piglit build fails: NameError: global name 'fake_whitespace' is not defined
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 -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 > > > > 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
Re: [Piglit] Piglit build fails: NameError: global name 'fake_whitespace' is not defined
what does: python -c 'import mako; print mako.__version__' return? 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 > > 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 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] Piglit build fails: NameError: global name 'fake_whitespace' is not defined
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 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] Make GLSLParserTest more strict
On Tuesday, June 24, 2014 04:54:14 PM Dylan Baker wrote: > This series makes the constructor for GLSLParserTest more strict, in > what the parser accepts and rejects. The goal of this series is to > future-proof against recent problems with glsl parser tests where some > used commas to seperate the require_extension key, and where some tests > had more than one key. Oops, patches 2 and 3 aren't quite baked yet. I'll send out a v2 with the fixes suggested by Ilia for patch 1 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 1/3] glsl_parser_test.py: Don't allow , or ; between require_extensions
On Tue, Jun 24, 2014 at 7:54 PM, Dylan Baker wrote: > This is not a valid input, require_extensions is a space delimited list > of extensions, raise a exception if these are requested. > > Signed-off-by: Dylan Baker > --- > framework/glsl_parser_test.py | 7 +- > framework/tests/glsl_parser_test_tests.py | 36 > +++ > 2 files changed, 42 insertions(+), 1 deletion(-) > > diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py > index 27fd2ca..52b87f1 100644 > --- a/framework/glsl_parser_test.py > +++ b/framework/glsl_parser_test.py > @@ -152,7 +152,12 @@ class GLSLParserTest(PiglitTest): > config.get('config', 'glsl_version')] > if config.get('config', 'check_link').lower() == 'true': > command.append('--check-link') > -command.extend(config.get('config', > 'require_extensions').split()) > +required = config.get('config', 'require_extensions').split() > +for x in required: > +if x[-1] in [';', ',']: It might be safe to just say if there's anything that's not [A-Za-z0-9_\s] in there, then that's no good. (And if you're pre-splitting, without the \s.) Otherwise someone will invariably write require_extensions: a ,b or something else equally silly. You can use a pre-compiled regex to speed things up a bit. > +raise GLSLParserException('require_extensions cannot be ' > + 'seperated with "," or ";"') > +command.extend(required) > > super(GLSLParserTest, self).__init__(command, > run_concurrent=True) > > diff --git a/framework/tests/glsl_parser_test_tests.py > b/framework/tests/glsl_parser_test_tests.py > index 5e083b8..9794331 100644 > --- a/framework/tests/glsl_parser_test_tests.py > +++ b/framework/tests/glsl_parser_test_tests.py > @@ -144,3 +144,39 @@ def test_blank_in_config(): > def test_glslparser_initializer(): > """ GLSLParserTest initializes """ > > glsl.GLSLParserTest('tests/spec/glsl-es-1.00/compiler/version-macro.frag') > + > + > +def test_glslparser_require_trailing_comma(): > +""" GLSLParserTest() asserts if ',' are used on extensions """ > +content = ('// [config]\n' > + '// expect_result: pass\n' > + '// glsl_version: 1.00\n' > + '// require_extensions: ARB_ham_sandwhich, ARB_pb&j\n' > + '// [end config]\n') > + > +with utils.with_tempfile(content) as tfile: > +with nt.assert_raises(glsl.GLSLParserException) as exc: > +glsl.GLSLParserTest(tfile) > +nt.assert_equal( > +exc.exception, > +'require_extensions cannot be seperated with "," or ";"', > +msg=("Exception not raised if ',' used to seperate" > + "require_extensions")) > + > + > +def test_glslparser_require_trailing_semicolon(): > +""" GLSLParserTest() asserts if ';' are used on extensions """ > +content = ('// [config]\n' > + '// expect_result: pass\n' > + '// glsl_version: 1.00\n' > + '// require_extensions: ARB_ham_sandwhich; ARB_pb&j\n' > + '// [end config]\n') > + > +with utils.with_tempfile(content) as tfile: > +with nt.assert_raises(glsl.GLSLParserException) as exc: > +glsl.GLSLParserTest(tfile) > +nt.assert_equal( > +exc.exception, > +'require_extensions cannot be seperated with "," or ";"', > +msg=("Exception not raised if ';' used to seperate" > + "require_extensions")) > -- > 2.0.0 > > ___ > 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 v2] arb_fragment_layer_viewport: simple write tests
With no layered fb and unconfigured viewports, the values of gl_Layer/gl_ViewportIndex shouldn't matter for rendering. Make sure that they're being passed through correctly from GS to FS. Similarly add a test that writes layer in VS and checks it in FS. Signed-off-by: Ilia Mirkin --- v1 -> v2: - use passthrough vertex shader - changed tests to be 4 draws instead of 5, drawing each into separate quadrants and doing one check at the end. should make it easier to identify issues - added a vs test that uses AMD_vertex_shader_layer (tested using softpipe) I didn't maintain the R-b's on the v1 due to the various changes. .../layer-gs-write-simple.shader_test | 53 + .../layer-vs-write-simple.shader_test | 48 +++ .../viewport-gs-write-simple.shader_test | 55 ++ 3 files changed, 156 insertions(+) create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test create mode 100644 tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test diff --git a/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test new file mode 100644 index 000..bfafcb1 --- /dev/null +++ b/tests/spec/arb_fragment_layer_viewport/layer-gs-write-simple.shader_test @@ -0,0 +1,53 @@ +[require] +GLSL >= 1.50 +GL_ARB_fragment_layer_viewport + +[vertex shader passthrough] + +[geometry shader] +#version 150 + +layout(triangles) in; +layout(triangle_strip, max_vertices=3) out; +uniform int layer; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = gl_in[i].gl_Position; + gl_Layer = layer; + EmitVertex(); + } +} + +[fragment shader] +#version 150 +#extension GL_ARB_fragment_layer_viewport: require + +uniform int layer; + +void main() +{ + if (gl_Layer == layer) + gl_FragColor = vec4(0,1,0,0); + else + gl_FragColor = vec4(1,0,0,0); +} + +[test] +clear color 0.0 0.0 0.0 0.0 +clear + +uniform int layer 0 +draw rect -1 -1 1 1 + +uniform int layer 1 +draw rect 0 -1 1 1 + +uniform int layer 1 +draw rect -1 0 1 1 + +uniform int layer -1 +draw rect 0 0 1 1 + +probe all rgb 0.0 1.0 0.0 diff --git a/tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test b/tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test new file mode 100644 index 000..fe453fb --- /dev/null +++ b/tests/spec/arb_fragment_layer_viewport/layer-vs-write-simple.shader_test @@ -0,0 +1,48 @@ +[require] +GLSL >= 1.40 +GL_ARB_fragment_layer_viewport +GL_AMD_vertex_shader_layer + +[vertex shader] +#version 140 +#extension GL_AMD_vertex_shader_layer: enable +in vec4 piglit_vertex; +uniform int layer; + +void main() +{ + gl_Position = piglit_vertex; + gl_Layer = layer; +} + +[fragment shader] +#version 140 +#extension GL_ARB_fragment_layer_viewport: require + +uniform int layer; + +void main() +{ + if (gl_Layer == layer) + gl_FragColor = vec4(0,1,0,0); + else + gl_FragColor = vec4(1,0,0,0); +} + +[test] +clear color 0.0 0.0 0.0 0.0 +clear + +uniform int layer 0 +draw rect -1 -1 1 1 + +uniform int layer 1 +draw rect 0 -1 1 1 + +uniform int layer 1 +draw rect -1 0 1 1 + +uniform int layer -1 +draw rect 0 0 1 1 + +probe all rgb 0.0 1.0 0.0 diff --git a/tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test b/tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test new file mode 100644 index 000..fd0ac4b --- /dev/null +++ b/tests/spec/arb_fragment_layer_viewport/viewport-gs-write-simple.shader_test @@ -0,0 +1,55 @@ +[require] +GLSL >= 1.50 +GL_ARB_fragment_layer_viewport +GL_ARB_viewport_array + +[vertex shader passthrough] + +[geometry shader] +#version 150 +#extension GL_ARB_viewport_array: enable + +layout(triangles) in; +layout(triangle_strip, max_vertices=3) out; +uniform int viewport; + +void main() +{ + for (int i = 0; i < 3; i++) { + gl_Position = gl_in[i].gl_Position; + gl_ViewportIndex = viewport; + EmitVertex(); + } +} + +[fragment shader] +#version 150 +#extension GL_ARB_fragment_layer_viewport: require + +uniform int viewport; + +void main() +{ + if (gl_ViewportIndex == viewport) + gl_FragColor = vec4(0,1,0,0); + else + gl_FragColor = vec4(1,0,0,0); +} + +[test] +clear color 0.0 0.0 0.0 0.0 +clear + +uniform int viewport 0 +draw rect -1 -1 1 1 + +uniform int viewport 1 +draw rect 0 -1 1 1 + +uniform int viewport 1 +draw rect -1 0 1 1 + +uniform int viewport -1 +draw rect 0 0 1 1 + +probe all rgb 0.0 1.0 0.0 -- 1.8.5.5 ___ Piglit mailing list P
[Piglit] Make GLSLParserTest more strict
This series makes the constructor for GLSLParserTest more strict, in what the parser accepts and rejects. The goal of this series is to future-proof against recent problems with glsl parser tests where some used commas to seperate the require_extension key, and where some tests had more than one key. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 3/3] glsl_parser_test.py: Limit keys to known keys
This disallows keys that are unknown from being added. Signed-off-by: Dylan Baker --- framework/glsl_parser_test.py | 15 +-- framework/tests/glsl_parser_test_tests.py | 12 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py index a71c167..c268d06 100644 --- a/framework/glsl_parser_test.py +++ b/framework/glsl_parser_test.py @@ -80,6 +80,10 @@ class GLSLParserTest(PiglitTest): .tesc, .tese, .geom or .frag """ +# A list of valid keys for the config section +_CONFIG_KEYS = set(['expect_result', 'glsl_version', +'require_extensions']) + def __init__(self, filepath): # Text of config section. text_io = StringIO() @@ -87,11 +91,18 @@ class GLSLParserTest(PiglitTest): def add_line(line): """ Add line to the stringio, and validate the keys """ -# Ensure that this is the only instance of this key split = line.split(':')[0] + +# If the line is '\n' then we got a blank newline, go on +if split == '\n': +return # this is effectively 'continue' +assert split in self._CONFIG_KEYS, 'Unexpected key: "{0}"'.format( +split) + assert split not in found_keys, 'Duplicate key: "{0}"'.format( split) found_keys.add(split) + text_io.write(line) os.stat(filepath) @@ -131,10 +142,10 @@ class GLSLParserTest(PiglitTest): # it into the StringIO elif line[:2] in ['//', '/*', '*/']: add_line(line[2:].lstrip() + '\n') +# If we have just * then we're in the middle of a C style # comment, do like above elif line[:1] == '*': add_line(line[1:].lstrip() + '\n') -# If we have just * then we're in the middle of a C style else: raise GLSLParserException( "The config section is malformed." diff --git a/framework/tests/glsl_parser_test_tests.py b/framework/tests/glsl_parser_test_tests.py index ebfa0ce..6227727 100644 --- a/framework/tests/glsl_parser_test_tests.py +++ b/framework/tests/glsl_parser_test_tests.py @@ -204,3 +204,15 @@ def test_duplicate_entries(): ''.join(x[1] for x in content), value) yield check_no_duplicates, test + + +@nt.raises(AssertionError) +def test_bad_section_name(): +""" A section name not in the _CONFIG_KEYS name raises an error """ +content = ('// [config]\n' + '// expect_result: pass\n' + '// glsl_version: 1.00\n' + '// new_awesome_key: foo\n' + '// [end config]\n') + +_check_config(content) -- 2.0.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/3] glsl_parser_test.py: Don't allow , or ; between require_extensions
This is not a valid input, require_extensions is a space delimited list of extensions, raise a exception if these are requested. Signed-off-by: Dylan Baker --- framework/glsl_parser_test.py | 7 +- framework/tests/glsl_parser_test_tests.py | 36 +++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py index 27fd2ca..52b87f1 100644 --- a/framework/glsl_parser_test.py +++ b/framework/glsl_parser_test.py @@ -152,7 +152,12 @@ class GLSLParserTest(PiglitTest): config.get('config', 'glsl_version')] if config.get('config', 'check_link').lower() == 'true': command.append('--check-link') -command.extend(config.get('config', 'require_extensions').split()) +required = config.get('config', 'require_extensions').split() +for x in required: +if x[-1] in [';', ',']: +raise GLSLParserException('require_extensions cannot be ' + 'seperated with "," or ";"') +command.extend(required) super(GLSLParserTest, self).__init__(command, run_concurrent=True) diff --git a/framework/tests/glsl_parser_test_tests.py b/framework/tests/glsl_parser_test_tests.py index 5e083b8..9794331 100644 --- a/framework/tests/glsl_parser_test_tests.py +++ b/framework/tests/glsl_parser_test_tests.py @@ -144,3 +144,39 @@ def test_blank_in_config(): def test_glslparser_initializer(): """ GLSLParserTest initializes """ glsl.GLSLParserTest('tests/spec/glsl-es-1.00/compiler/version-macro.frag') + + +def test_glslparser_require_trailing_comma(): +""" GLSLParserTest() asserts if ',' are used on extensions """ +content = ('// [config]\n' + '// expect_result: pass\n' + '// glsl_version: 1.00\n' + '// require_extensions: ARB_ham_sandwhich, ARB_pb&j\n' + '// [end config]\n') + +with utils.with_tempfile(content) as tfile: +with nt.assert_raises(glsl.GLSLParserException) as exc: +glsl.GLSLParserTest(tfile) +nt.assert_equal( +exc.exception, +'require_extensions cannot be seperated with "," or ";"', +msg=("Exception not raised if ',' used to seperate" + "require_extensions")) + + +def test_glslparser_require_trailing_semicolon(): +""" GLSLParserTest() asserts if ';' are used on extensions """ +content = ('// [config]\n' + '// expect_result: pass\n' + '// glsl_version: 1.00\n' + '// require_extensions: ARB_ham_sandwhich; ARB_pb&j\n' + '// [end config]\n') + +with utils.with_tempfile(content) as tfile: +with nt.assert_raises(glsl.GLSLParserException) as exc: +glsl.GLSLParserTest(tfile) +nt.assert_equal( +exc.exception, +'require_extensions cannot be seperated with "," or ";"', +msg=("Exception not raised if ';' used to seperate" + "require_extensions")) -- 2.0.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/3] glsl_parser_test.py: Add checks for duplicate keys
Recently some tests were discovered to have duplicate keys in the config section of glsl parser tests, which resulted in undesirable behavior. The config section is basically an ini file, which allows duplicate sections, but only the last entry should be honored. Piglit doesn't really want that behavior, instead treat duplicate sections as a bug and raise an exception if they are detected Signed-off-by: Dylan Baker --- framework/glsl_parser_test.py | 16 +--- framework/tests/glsl_parser_test_tests.py | 24 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py index 52b87f1..a71c167 100644 --- a/framework/glsl_parser_test.py +++ b/framework/glsl_parser_test.py @@ -85,6 +85,15 @@ class GLSLParserTest(PiglitTest): text_io = StringIO() text_io.write('[config]\n') +def add_line(line): +""" Add line to the stringio, and validate the keys """ +# Ensure that this is the only instance of this key +split = line.split(':')[0] +assert split not in found_keys, 'Duplicate key: "{0}"'.format( +split) +found_keys.add(split) +text_io.write(line) + os.stat(filepath) # Parse the config file and get the config section, then write this @@ -104,6 +113,7 @@ class GLSLParserTest(PiglitTest): else: raise GLSLParserException("No [config] section found!") +found_keys = set() is_header = re.compile(r'\s*(//|/\*|\*)\s*\[end config\]') for line in lines: # Remove all leading whitespace @@ -120,11 +130,11 @@ class GLSLParserTest(PiglitTest): # remove that and any newly revealed whitespace, then write # it into the StringIO elif line[:2] in ['//', '/*', '*/']: -text_io.write(line[2:].lstrip() + '\n') -# If we have just * then we're in the middle of a C style +add_line(line[2:].lstrip() + '\n') # comment, do like above elif line[:1] == '*': -text_io.write(line[1:].lstrip() + '\n') +add_line(line[1:].lstrip() + '\n') +# If we have just * then we're in the middle of a C style else: raise GLSLParserException( "The config section is malformed." diff --git a/framework/tests/glsl_parser_test_tests.py b/framework/tests/glsl_parser_test_tests.py index 9794331..ebfa0ce 100644 --- a/framework/tests/glsl_parser_test_tests.py +++ b/framework/tests/glsl_parser_test_tests.py @@ -180,3 +180,27 @@ def test_glslparser_require_trailing_semicolon(): 'require_extensions cannot be seperated with "," or ";"', msg=("Exception not raised if ';' used to seperate" "require_extensions")) + + +@nt.raises(AssertionError) +def check_no_duplicates(content): +""" Ensure that duplicate entries raise an error """ +_check_config(content) + + +@utils.nose_generator +def test_duplicate_entries(): +""" Generate tests for duplicate keys in the config block """ +content = [ +('expect_result', '// expect_result: pass\n'), +('glsl_version', '// glsl_version: 1.00\n'), +('require_extensions', '// require_extensions: ARB_ham_sandwhich\n') +] + +for name, value in content: +check_no_duplicates.description = \ +"duplicate values of {0} raise an exception".format(name) +test = '// [config]\n{0}{1}// [end config]'.format( +''.join(x[1] for x in content), value) + +yield check_no_duplicates, test -- 2.0.0 ___ 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
8 ulong16 crashes r600. Signed-off-by: Jan Vesely --- 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
Re: [Piglit] [PATCH] arb_arrays_of_arrays: fix required extensions
Reviewed-by: Marek Olšák Marek On Tue, Jun 24, 2014 at 11:21 PM, Matt Turner wrote: > Reviewed-by: Matt Turner ___ 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.
On Tuesday, June 24, 2014 02:23:23 PM Matt Turner 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* Reviewed-by: Dylan Baker 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] core.py: Add additional catch to collect_system_info()
On Tue, Jun 24, 2014 at 01:21:41PM -0700, Dylan Baker wrote: > 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 > Tested-by: Tom Stellard > Signed-off-by: Dylan Baker > --- > > 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 mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_arrays_of_arrays: geometry shader tests
A number of these tests are reasonable assumptions where the spec doesn't provide full detail. The AMD driver however doesn't even follow the spec in many cases where there are full details. I would be interested in what the results are of running these on Nvidias drivers if anyone has a free bit of time to run them for me (as I don't own a Nvidia card). Thanks, Tim On Tue, 2014-06-24 at 08:20 +1000, Timothy Arceri wrote: > Test results are from the following hardware/driver combination: > > AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3 > > gs-input-sizing-consistent-with-prev-length-blocks.geom > pass > > gs-input-sizing-consistent-with-prev-length.geom > pass > > gs-input-sizing-implied-length-blocks.geom > pass > > gs-input-sizing-implied-length-consistent-with-prev-usage-blocks.geom > pass > > gs-input-sizing-implied-length-consistent-with-prev-usage.geom > pass > > gs-input-sizing-implied-length-inconsistent-with-prev-usage-blocks.geom > fail > > gs-input-sizing-implied-length-inconsistent-with-prev-usage.geom > fail > > gs-input-sizing-implied-length.geom > pass > > gs-input-sizing-inconsistent-blocks-invalid.geom > fail > > gs-input-sizing-inconsistent-blocks-valid.geom > pass > > gs-input-sizing-inconsistent-invalid.geom > fail > > gs-input-sizing-inconsistent-valid.geom > pass > > gs-output.geom > pass > > gs-redeclares-pervertex-in-as-array-of-arrays.geom > fail > > gs-redeclares-pervertex-in-as-array-of-arrays2.geom > fail > > Signed-off-by: Timothy Arceri > --- > ...-sizing-consistent-with-prev-length-blocks.geom | 40 +++ > ...s-input-sizing-consistent-with-prev-length.geom | 33 > .../gs-input-sizing-implied-length-blocks.geom | 31 +++ > ...d-length-consistent-with-prev-usage-blocks.geom | 41 > ...-implied-length-consistent-with-prev-usage.geom | 38 ++ > ...length-inconsistent-with-prev-usage-blocks.geom | 41 > ...mplied-length-inconsistent-with-prev-usage.geom | 38 ++ > .../compiler/gs-input-sizing-implied-length.geom | 27 + > ...s-input-sizing-inconsistent-blocks-invalid.geom | 37 ++ > .../gs-input-sizing-inconsistent-blocks-valid.geom | 21 ++ > .../gs-input-sizing-inconsistent-invalid.geom | 31 +++ > .../gs-input-sizing-inconsistent-valid.geom| 16 > .../arb_arrays_of_arrays/compiler/gs-output.geom | 28 ++ > ...redeclares-pervertex-in-as-array-of-arrays.geom | 45 > ++ > ...edeclares-pervertex-in-as-array-of-arrays2.geom | 45 > ++ > 15 files changed, 512 insertions(+) > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-consistent-with-prev-length-blocks.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-consistent-with-prev-length.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length-blocks.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length-consistent-with-prev-usage-blocks.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length-consistent-with-prev-usage.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length-inconsistent-with-prev-usage-blocks.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length-inconsistent-with-prev-usage.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-implied-length.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-inconsistent-blocks-invalid.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-inconsistent-blocks-valid.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-inconsistent-invalid.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-inconsistent-valid.geom > create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/gs-output.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-redeclares-pervertex-in-as-array-of-arrays.geom > create mode 100644 > tests/spec/arb_arrays_of_arrays/compiler/gs-redeclares-pervertex-in-as-array-of-arrays2.geom > > diff --git > a/tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-consistent-with-prev-length-blocks.geom > > b/tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-consistent-with-prev-length-blocks.geom > new file mode 100644 > index 000..fb2fcff > --- /dev/null > +++ > b/tests/spec/arb_arrays_of_arrays/compiler/gs-input-sizing-consistent-with-prev-length-blocks.geom > @@ -0,0 +1,40 @@ > +// Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec > +// includes the following examples of compile-time errors: >
Re: [Piglit] [PATCH] ARB_explicit_attrib_location: Remove commas from require_extensions line.
Reviewed-by: Chris Forbes On Wed, Jun 25, 2014 at 9:23 AM, Matt Turner 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] ARB_explicit_attrib_location: Remove commas from require_extensions line.
--- 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
Re: [Piglit] [PATCH] arb_arrays_of_arrays: fix required extensions
Reviewed-by: Matt Turner ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
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
[Piglit] [PATCH] arb_arrays_of_arrays: fix required extensions
Signed-off-by: Timothy Arceri --- 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 120 diff --git a/tests
[Piglit] [PATCH] core.py: Add additional catch to collect_system_info()
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 --- 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 v2 1/1] cl: Extend float to long conversion test
Fill in subtest name v2: Add 2^63 as a test value Signed-off-by: Jan Vesely --- .../execute/builtin/convert/float-convert_long.cl | 28 -- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/tests/cl/program/execute/builtin/convert/float-convert_long.cl b/tests/cl/program/execute/builtin/convert/float-convert_long.cl index 3d6930a..c8baa38 100644 --- a/tests/cl/program/execute/builtin/convert/float-convert_long.cl +++ b/tests/cl/program/execute/builtin/convert/float-convert_long.cl @@ -4,9 +4,10 @@ name: convert_long(float) dimensions: 1 global_size: 1 1 1 local_size: 1 1 1 -kernel_name: test [test] +name: convert_long(float) +kernel_name: test_long arg_out: 0 buffer long[8] 0 36864 -47104 41943040 -35651584 131 50 -60 # These values were choosen to exercise all code paths in the generic # implementation of __fixsfdi in compiler-rt: @@ -20,11 +21,34 @@ arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0 50.0 \ # Positive value requiring more than 32-bits -60.0 # Negative value requiring more than 32-bits +[test] +name: convert_ulong(float) +kernel_name: test_ulong +arg_out: 0 buffer ulong[8] 0 36864 47104 41943040 35651584 131 50 9223372036854775808 +# These values were choosen to exercise all code paths in the generic +# implementation of __fixsfdi in compiler-rt: +# https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c +arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0 + 0x1.2p+15 \ # pos exp <= 23 + 0x1.7p+15 \ # pos exp <= 23 + 0x1.4p25 \ # pos exp > 23 + 0x1.1p25 \ # pos exp > 23 + 131.35\ # Random non-integer value + 50.0 \ # Positive value requiring more than 32-bits + 9223372036854775808.0 # Positive value requiring 64-bits + !*/ -kernel void test(global long *out, global float *in) { +kernel void test_long(global long *out, global float *in) { unsigned i; for (i = 0; i < 8; i++) { out[i] = convert_long(in[i]); } } + +kernel void test_ulong(global ulong *out, global float *in) { + unsigned i; + for (i = 0; i < 8; i++) { + out[i] = convert_ulong(in[i]); + } +} -- 1.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Time to switch to Python 3 already?
On 06/24/2014 10:30 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" That would certainly make the 'Revert "python: change she-bang to python2"' debate moot. I'd support the move just for that. :) I think picking a specific date to make a python2 branch and land the python3 patches is a good idea. How does Friday, June 27th sound? > 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 mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 1:24 PM, Ian Romanick wrote: > On 06/24/2014 10:08 AM, Ilia Mirkin wrote: >> On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick wrote: >>> On 06/24/2014 08:27 AM, Ilia Mirkin wrote: On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke 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. If piglit as a project is the only one taking the stand? You're 100% right. However if all software developers take this approach, then Arch will definitely have to change (or have to start patching _tons_ of stuff). It has to start somehow. The attitude should be "it is broken for python to not be python2.x", not "we should cater to various incompatibilities introduced by odd distros". (Or perhaps you disagree on that point, in which case, fine.) And the piglit community is a fairly tech-savvy one, so if we throw in the detection thing that yells at you for trying it with p3yk, they'll be able to handle it. -ilia ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] Time to switch to Python 3 already?
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
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On 06/24/2014 10:08 AM, Ilia Mirkin wrote: > On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick wrote: >> On 06/24/2014 08:27 AM, Ilia Mirkin wrote: >>> On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke >>> 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] [PATCH 1/1] cl: Extend float to long conversion test
Fill in subtest name Signed-off-by: Jan Vesely --- I kept the same values for ulong version, even if there are duplicates. .../execute/builtin/convert/float-convert_long.cl | 28 -- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/tests/cl/program/execute/builtin/convert/float-convert_long.cl b/tests/cl/program/execute/builtin/convert/float-convert_long.cl index 3d6930a..935d88f 100644 --- a/tests/cl/program/execute/builtin/convert/float-convert_long.cl +++ b/tests/cl/program/execute/builtin/convert/float-convert_long.cl @@ -4,9 +4,10 @@ name: convert_long(float) dimensions: 1 global_size: 1 1 1 local_size: 1 1 1 -kernel_name: test [test] +name: convert_long(float) +kernel_name: test_long arg_out: 0 buffer long[8] 0 36864 -47104 41943040 -35651584 131 50 -60 # These values were choosen to exercise all code paths in the generic # implementation of __fixsfdi in compiler-rt: @@ -20,11 +21,34 @@ arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0 50.0 \ # Positive value requiring more than 32-bits -60.0 # Negative value requiring more than 32-bits +[test] +name: convert_ulong(float) +kernel_name: test_ulong +arg_out: 0 buffer ulong[8] 0 36864 47104 41943040 35651584 131 50 60 +# These values were choosen to exercise all code paths in the generic +# implementation of __fixsfdi in compiler-rt: +# https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/fixsfdi.c +arg_in: 1 buffer float[8] 0x1.2p-5 \ # exp < 0 + 0x1.2p+15 \ # pos exp <= 23 + 0x1.7p+15 \ # pos exp <= 23 + 0x1.4p25 \ # pos exp > 23 + 0x1.1p25 \ # pos exp > 23 + 131.35\ # Random non-integer value + 50.0 \ # Positive value requiring more than 32-bits + 60.0# Positive value requiring more than 32-bits + !*/ -kernel void test(global long *out, global float *in) { +kernel void test_long(global long *out, global float *in) { unsigned i; for (i = 0; i < 8; i++) { out[i] = convert_long(in[i]); } } + +kernel void test_ulong(global ulong *out, global float *in) { + unsigned i; + for (i = 0; i < 8; i++) { + out[i] = convert_ulong(in[i]); + } +} -- 1.9.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 1:16 PM, Matt Turner wrote: > On Tue, Jun 24, 2014 at 10:08 AM, Ilia Mirkin wrote: >> On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick wrote: >>> On 06/24/2014 08:27 AM, Ilia Mirkin wrote: On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke 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? > > Who is "us"? You run Gentoo. You're unaffected in either case. The makers of software... ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 10:08 AM, Ilia Mirkin wrote: > On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick wrote: >> On 06/24/2014 08:27 AM, Ilia Mirkin wrote: >>> On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke >>> 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? Who is "us"? You run Gentoo. You're unaffected in either case. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 1:04 PM, Ian Romanick wrote: > On 06/24/2014 08:27 AM, Ilia Mirkin wrote: >> On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke >> 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? ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On 06/24/2014 08:27 AM, Ilia Mirkin wrote: > On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke > 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. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 11:53 AM, Kenneth Graunke wrote: > On Tuesday, June 24, 2014 11:27:13 AM Ilia Mirkin wrote: >> On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke > 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 >> > from framework.programs.run import run >> > File "/home/kwg/Projects/piglit/framework/programs/run.py", line 30, in >> > >> > import framework.core as core >> > File "/home/kwg/Projects/piglit/framework/core.py", line 32, in >> > 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"
On Tuesday, June 24, 2014 11:27:13 AM Ilia Mirkin wrote: > On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke 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 > > from framework.programs.run import run > > File "/home/kwg/Projects/piglit/framework/programs/run.py", line 30, in > > > > import framework.core as core > > File "/home/kwg/Projects/piglit/framework/core.py", line 32, in > > 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. People aren't likely to change their whole Linux distribution over a single symlink, either. Boycotting isn't a solution. 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 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] triangle-rasterization: increase the precision of the test
On 24/06/14 00:24, srol...@vmware.com wrote: From: Zack Rusin Increase the subpixel precision to 8 bits. This requires changing some of the code to 64 bits to avoid overflows. v2 (sroland): Query GL for the number of subpixel bits and use that instead of a fixed 8 bits. Note that mesa drivers don't set this yet individually always using default 4 bits (GL requires 4 bits, all d3d10 capable hw should have 8 bits) and gallium drivers even can't set it so also add an override subpixel_bits arg so any desired precision can be tested. --- tests/general/triangle-rasterization.cpp | 96 ++-- 1 file changed, 53 insertions(+), 43 deletions(-) diff --git a/tests/general/triangle-rasterization.cpp b/tests/general/triangle-rasterization.cpp index d006188..bd20af2 100644 --- a/tests/general/triangle-rasterization.cpp +++ b/tests/general/triangle-rasterization.cpp @@ -103,8 +103,8 @@ static enum filling_convention_t { } filling_convention; /* Fixed point format */ -const int FIXED_SHIFT = 4; -const int FIXED_ONE = 1 << FIXED_SHIFT; +static int FIXED_SHIFT; +static int FIXED_ONE; /* Default test size */ int fbo_width = 256; @@ -144,13 +144,13 @@ namespace std { } /* Proper rounding of float to integer */ -int iround(float v) +int64_t iround(float v) { if (v > 0.0f) v += 0.5f; if (v < 0.0f) v -= 0.5f; - return (int)v; + return (int64_t)v; } /* Calculate log2 for integers */ @@ -168,57 +168,57 @@ void rast_triangle(uint8_t* buffer, uint32_t stride, const Triangle& tri) { float center_offset = -0.5f; - /* 28.4 fixed point coordinates */ - int x1 = iround(FIXED_ONE * (tri[0].x + center_offset)); - int x2 = iround(FIXED_ONE * (tri[1].x + center_offset)); - int x3 = iround(FIXED_ONE * (tri[2].x + center_offset)); + /* fixed point coordinates */ + int64_t x1 = iround(FIXED_ONE * (tri[0].x + center_offset)); + int64_t x2 = iround(FIXED_ONE * (tri[1].x + center_offset)); + int64_t x3 = iround(FIXED_ONE * (tri[2].x + center_offset)); - int y1 = iround(FIXED_ONE * (tri[0].y + center_offset)); - int y2 = iround(FIXED_ONE * (tri[1].y + center_offset)); - int y3 = iround(FIXED_ONE * (tri[2].y + center_offset)); + int64_t y1 = iround(FIXED_ONE * (tri[0].y + center_offset)); + int64_t y2 = iround(FIXED_ONE * (tri[1].y + center_offset)); + int64_t y3 = iround(FIXED_ONE * (tri[2].y + center_offset)); /* Force correct vertex order */ - const int cross = (x2 - x1) * (y3 - y2) - (y2 - y1) * (x3 - x2); + const int64_t cross = (x2 - x1) * (y3 - y2) - (y2 - y1) * (x3 - x2); if (cross > 0) { std::swap(x1, x3); std::swap(y1, y3); } /* Deltas */ - const int dx12 = x1 - x2; - const int dx23 = x2 - x3; - const int dx31 = x3 - x1; + const int64_t dx12 = x1 - x2; + const int64_t dx23 = x2 - x3; + const int64_t dx31 = x3 - x1; - const int dy12 = y1 - y2; - const int dy23 = y2 - y3; - const int dy31 = y3 - y1; + const int64_t dy12 = y1 - y2; + const int64_t dy23 = y2 - y3; + const int64_t dy31 = y3 - y1; /* Fixed-point deltas */ - const int fdx12 = dx12 << FIXED_SHIFT; - const int fdx23 = dx23 << FIXED_SHIFT; - const int fdx31 = dx31 << FIXED_SHIFT; + const int64_t fdx12 = dx12 << FIXED_SHIFT; + const int64_t fdx23 = dx23 << FIXED_SHIFT; + const int64_t fdx31 = dx31 << FIXED_SHIFT; - const int fdy12 = dy12 << FIXED_SHIFT; - const int fdy23 = dy23 << FIXED_SHIFT; - const int fdy31 = dy31 << FIXED_SHIFT; + const int64_t fdy12 = dy12 << FIXED_SHIFT; + const int64_t fdy23 = dy23 << FIXED_SHIFT; + const int64_t fdy31 = dy31 << FIXED_SHIFT; /* Bounding rectangle */ - int minx = std::min(x1, x2, x3) >> FIXED_SHIFT; - int maxx = (std::max(x1, x2, x3)) >> FIXED_SHIFT; + int64_t minx = std::min(x1, x2, x3) >> FIXED_SHIFT; + int64_t maxx = (std::max(x1, x2, x3)) >> FIXED_SHIFT; - int miny = (std::min(y1, y2, y3)) >> FIXED_SHIFT; - int maxy = std::max(y1, y2, y3) >> FIXED_SHIFT; + int64_t miny = (std::min(y1, y2, y3)) >> FIXED_SHIFT; + int64_t maxy = std::max(y1, y2, y3) >> FIXED_SHIFT; - minx = std::max(minx, 0); - maxx = std::min(maxx, fbo_width - 1); + minx = std::max(minx, (int64_t)0); + maxx = std::min(maxx, (int64_t)fbo_width - 1); - miny = std::max(miny, 0); - maxy = std::min(maxy, fbo_height - 1); + miny = std::max(miny, (int64_t)0); + maxy = std::min(maxy, (int64_t)fbo_height - 1); /* Half-edge constants */ - int c1 = dy12 * x1 - dx12 * y1; - int c2 = dy23 * x2 - dx23 * y2; - int c3 = dy31 * x3 - dx31 * y3; + int64_t c1 = dy12 * x1 - dx12 * y1; + int64_t c2 = dy23 * x2 -
Re: [Piglit] [PATCH] glsl-1.10: Add simple test to check for code generated by clamp bounded within 1, 0
On 06/23/2014 01:18 PM, Abdiel Janulgue wrote: > This is for checking that the compiler outputs the correct optimization > when clamp is bounded within 0.0 and 1.0. > > Signed-off-by: Abdiel Janulgue > --- > .../execution/fs-clamp-bounds.shader_test | 28 +++ > .../execution/vs-clamp-bounds.shader_test | 32 > ++ > 2 files changed, 60 insertions(+) > create mode 100644 tests/spec/glsl-1.10/execution/fs-clamp-bounds.shader_test > create mode 100644 tests/spec/glsl-1.10/execution/vs-clamp-bounds.shader_test > > diff --git a/tests/spec/glsl-1.10/execution/fs-clamp-bounds.shader_test > b/tests/spec/glsl-1.10/execution/fs-clamp-bounds.shader_test > new file mode 100644 > index 000..13233e8 > --- /dev/null > +++ b/tests/spec/glsl-1.10/execution/fs-clamp-bounds.shader_test > @@ -0,0 +1,28 @@ > +[require] > +GLSL >= 1.10 > + > +[vertex shader] > +void main() > +{ > + gl_Position = gl_Vertex; > +} > + > +[fragment shader] > +uniform bool low_bound; > +uniform vec4 v; > + > +void main() > +{ > + gl_FragColor = low_bound ? clamp(v, 0.2, 1.0) : clamp(v, 0.0, 0.9); > +} > + > +[test] > +uniform int low_bound 0 > +uniform vec4 v 0.25 1.0 2.0 0.25 > +draw rect -1 -1 2 2 > +probe all rgba 0.25 0.9 0.9 0.25 > + > +uniform int low_bound 1 > +uniform vec4 v 0.25 1.0 2.0 0.25 > +draw rect -1 -1 2 2 This second draw will completely over-write the first draw. When run without -auto this makes it impossible to see (in the window on the screen) an error in the first draw. Instead, draw rect -1 -1 1 2 ... draw rect 0 -1 1 2 for both tests. That also means you'll need to either use a different probe or change the way results are generated. > +probe all rgba 0.25 1.0 1.0 0.25 > diff --git a/tests/spec/glsl-1.10/execution/vs-clamp-bounds.shader_test > b/tests/spec/glsl-1.10/execution/vs-clamp-bounds.shader_test > new file mode 100644 > index 000..6b40dc0 > --- /dev/null > +++ b/tests/spec/glsl-1.10/execution/vs-clamp-bounds.shader_test > @@ -0,0 +1,32 @@ > +[require] > +GLSL >= 1.10 > + > +[vertex shader] > +uniform bool low_bound; > +uniform vec4 v; > +varying vec4 color; > + > +void main() > +{ > + color = low_bound ? clamp(v, 0.2, 1.0) : clamp(v, 0.0, 0.9); > + gl_Position = gl_Vertex; > +} > + > +[fragment shader] > +varying vec4 color; > + > +void main() > +{ > + gl_FragColor = color; > +} > + > +[test] > +uniform int low_bound 0 > +uniform vec4 v 0.25 1.0 2.0 0.25 > +draw rect -1 -1 2 2 > +probe all rgba 0.25 0.9 0.9 0.25 > + > +uniform int low_bound 1 > +uniform vec4 v 0.25 1.0 2.0 0.25 > +draw rect -1 -1 2 2 > +probe all rgba 0.25 1.0 1.0 0.25 > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Revert "python: change she-bang to python2"
On Tue, Jun 24, 2014 at 11:20 AM, Kenneth Graunke 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 > from framework.programs.run import run > File "/home/kwg/Projects/piglit/framework/programs/run.py", line 30, in > > import framework.core as core > File "/home/kwg/Projects/piglit/framework/core.py", line 32, in > 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"
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 from framework.programs.run import run File "/home/kwg/Projects/piglit/framework/programs/run.py", line 30, in import framework.core as core File "/home/kwg/Projects/piglit/framework/core.py", line 32, in 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
[Piglit] [PATCH] core: Catch all exceptions when collect_system_info() programs fail
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