Re: [Piglit] [PATCH] arb_gpu_shader5: add compiler tests for interpolateAt*

2013-11-11 Thread Anuj Phogat
On Sun, Nov 10, 2013 at 1:09 AM, Chris Forbes  wrote:
>
> ---
>  .../fs-interpolateAtCentroid-array.frag| 25 ++
>  .../fs-interpolateAtCentroid-bad-swizzle.frag  | 27 +++
>  .../fs-interpolateAtCentroid-centroid.frag | 30 
> ++
>  .../fs-interpolateAtCentroid-flat.frag | 30 
> ++
>  .../fs-interpolateAtCentroid-no-output.frag| 21 +++
>  .../fs-interpolateAtCentroid-no-temp.frag  | 22 
>  .../fs-interpolateAtCentroid-no-uniform.frag   | 20 +++
>  .../fs-interpolateAtCentroid-noperspective.frag| 30 
> ++
>  .../interpolation/fs-interpolateAtCentroid.frag| 25 ++
>  .../fs-interpolateAtOffset-nonconst.frag   | 27 +++
>  .../interpolation/fs-interpolateAtOffset.frag  | 28 
>  .../interpolation/fs-interpolateAtSample.frag  | 25 ++
>  12 files changed, 310 insertions(+)
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-array.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-bad-swizzle.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-centroid.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-flat.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-no-output.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-no-temp.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-no-uniform.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-noperspective.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtOffset-nonconst.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtOffset.frag
>  create mode 100644 
> tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtSample.frag
>
> diff --git 
> a/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-array.frag
>  
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-array.frag
> new file mode 100644
> index 000..274db83
> --- /dev/null
> +++ 
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-array.frag
> @@ -0,0 +1,25 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader5
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_gpu_shader5: require
> +
> +in float v1[2];
> +in vec2 v2[2];
> +in vec3 v3[2];
> +in vec4 v4[2];
> +
> +void main()
> +{
> +   vec4 res = vec4(0);
> +
> +   res += vec4(interpolateAtCentroid(v1[1]), 1, 1, 1);
> +   res += vec4(interpolateAtCentroid(v2[1]), 1, 1);
> +   res += vec4(interpolateAtCentroid(v3[1]), 1);
> +   res += interpolateAtCentroid(v4[1]);
> +
> +   gl_FragColor = res;
> +}
> diff --git 
> a/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-bad-swizzle.frag
>  
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-bad-swizzle.frag
> new file mode 100644
> index 000..b815f13
> --- /dev/null
> +++ 
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-bad-swizzle.frag
> @@ -0,0 +1,27 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader5
> +// [end config]
> +
> +// The ARB_gpu_shader5 spec says:
> +//"Component selection operators (e.g., ".xy") may not be used when
> +//specifying ."
> +
> +#version 150
> +#extension GL_ARB_gpu_shader5: require
> +
> +in vec2 v2;
> +in vec3 v3;
> +in vec4 v4;
> +
> +void main()
> +{
> +   vec4 res = vec4(0);
> +
> +   res += vec4(interpolateAtCentroid(v2.xy), 1, 1);
> +   res += vec4(interpolateAtCentroid(v3.xyz), 1);
> +   res += interpolateAtCentroid(v4.xyzw);
> +
> +   gl_FragColor = res;
> +}
> diff --git 
> a/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-centroid.frag
>  
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-centroid.frag
> new file mode 100644
> index 000..738c566
> --- /dev/null
> +++ 
> b/tests/spec/arb_gpu_shader5/compiler/interpolation/fs-interpolateAtCentroid-centroid.frag
> @@ -0,0 +1,30 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_gpu_shader5
> +// [end config]
> +
> +// From the ARB_gpu_shader5 spec:
> +// "If  is declared with a "flat" or
>

[Piglit] [PATCH] multi-draw-elements-base-vertex: Require GLSL 1.30.

2013-11-11 Thread Vinson Lee
Signed-off-by: Vinson Lee 
---
 .../arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c 
b/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c
index 8fdd666..0314ee2 100644
--- a/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c
+++ b/tests/spec/arb_draw_elements_base_vertex/multi-draw-elements-base-vertex.c
@@ -120,6 +120,8 @@ piglit_init(int argc, char **argv)
GLuint program;
GLuint vertex_index;
 
+   piglit_require_GLSL_version(130);
+
if (piglit_get_gl_version() < 32) {
piglit_require_extension("GL_ARB_draw_elements_base_vertex");
}
-- 
1.8.3.2

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


Re: [Piglit] [PATCH] CL: Fix memory leak in parse_name

2013-11-11 Thread Tom Stellard
On Mon, Nov 11, 2013 at 08:43:56AM -0600, Aaron Watry wrote:
> We need to free a regex after compiling/executing it.

Reviewed-by: Tom Stellard 

> ---
>  tests/cl/program/program-tester.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/cl/program/program-tester.c 
> b/tests/cl/program/program-tester.c
> index be6bc20..31aeec9 100644
> --- a/tests/cl/program/program-tester.c
> +++ b/tests/cl/program/program-tester.c
> @@ -1132,6 +1132,8 @@ parse_name(const char *input)
>   input, bad_char);
>   return NULL;
>   }
> +
> + regfree(®ex);
>   return name;
>  }
>  
> -- 
> 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


Re: [Piglit] [PATCH] Check that transform feedback size/type comes from gs, not vs.

2013-11-11 Thread Paul Berry
On 6 November 2013 14:21, Ian Romanick  wrote:

> On 10/23/2013 01:01 PM, Paul Berry wrote:
> > When the current program has both a geometry shader and a vertex
> > shader, transform feedback needs to link with the geometry shader.
> > This test verifies that the type and size of the varyings captured by
> > transform feedback match their declarations in the geometry shader,
> > even if there are vertex shader outputs with the same names and
> > different types.
>
> This will be even more fun with separate shader objects.
>
> Do we have a similar test that verifies that vertex shader outputs
> cannot be named by glTransformFeedbackVaryings?  So, rename vertex
> shader foo to foo2 and rename varyings foo to foo2.  There are a couple
> similar xfb cases that I plan to write for SSO.  If we don't already
> have non-SSO versions, I can make them.
>

I'm not aware of any tests like that.  Thanks!


>
> Anyway... This test is
>
> Reviewed-by: Ian Romanick 
>
> > The test exercises one built-in shader output (gl_ClipDistance) and
> > one user-defined shader output.
> > ---
> >  tests/all.tests|   1 +
> >  .../glsl-1.50/execution/geometry/CMakeLists.gl.txt |   1 +
> >  .../geometry/transform-feedback-type-and-size.c| 227
> +
> >  3 files changed, 229 insertions(+)
> >  create mode 100644
> tests/spec/glsl-1.50/execution/geometry/transform-feedback-type-and-size.c
> >
> > diff --git a/tests/all.tests b/tests/all.tests
> > index 9502ead..213114a 100644
> > --- a/tests/all.tests
> > +++ b/tests/all.tests
> > @@ -983,6 +983,7 @@ spec['glsl-1.50']['gs-emits-too-few-verts'] =
> concurrent_test('glsl-1.50-gs-emit
> >  spec['glsl-1.50']['gs-end-primitive-optional-with-points-out'] =
> concurrent_test('glsl-1.50-geometry-end-primitive-optional-with-points-out')
> >  spec['glsl-1.50']['getshaderiv-may-return-GS'] =
> concurrent_test('glsl-1.50-getshaderiv-may-return-GS')
> >  spec['glsl-1.50']['query-gs-prim-types'] =
> concurrent_test('glsl-1.50-query-gs-prim-types')
> > +spec['glsl-1.50']['transform-feedback-type-and-size'] =
> concurrent_test('glsl-1.50-transform-feedback-type-and-size')
> >
> >  spec['glsl-3.30'] = Group()
> >  spec['glsl-3.30']['built-in constants'] =
> concurrent_test('built-in-constants
> tests/spec/glsl-3.30/minimum-maximums.txt')
> > diff --git a/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
> b/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
> > index 3e6bc4b..447c92b 100644
> > --- a/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
> > +++ b/tests/spec/glsl-1.50/execution/geometry/CMakeLists.gl.txt
> > @@ -19,3 +19,4 @@ piglit_add_executable
> (glsl-1.50-gs-emits-too-few-verts gs-emits-too-few-verts.c
> >  piglit_add_executable (glsl-1.50-getshaderiv-may-return-GS
> getshaderiv-may-return-GS.c)
> >  piglit_add_executable (glsl-1.50-gs-mismatch-prim-type
> gs-mismatch-prim-type.c)
> >  piglit_add_executable (glsl-1.50-query-gs-prim-types
> query-gs-prim-types.c)
> > +piglit_add_executable (glsl-1.50-transform-feedback-type-and-size
> transform-feedback-type-and-size.c)
> > diff --git
> a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-type-and-size.c
> b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-type-and-size.c
> > new file mode 100644
> > index 000..07f31cc
> > --- /dev/null
> > +++
> b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-type-and-size.c
> > @@ -0,0 +1,227 @@
> > +/*
> > + * Copyright © 2013 Intel Corporation
> > + *
> > + * Permission is hereby granted, free of charge, to any person
> obtaining a
> > + * copy of this software and associated documentation files (the
> "Software"),
> > + * to deal in the Software without restriction, including without
> limitation
> > + * the rights to use, copy, modify, merge, publish, distribute,
> sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice (including the
> next
> > + * paragraph) shall be included in all copies or substantial portions
> of the
> > + * Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> SHALL
> > + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> OTHER
> > + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> ARISING
> > + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > + * DEALINGS IN THE SOFTWARE.
> > + */
> > +
> > +/** \file
> > + *
> > + * Verify that when transform feedback is applied to a program
> > + * containing both a geometry shader and a vertex shader, the size and
> > + * type of the data captured (as well as the data itself) 

Re: [Piglit] Fix subtests

2013-11-11 Thread Dylan Baker
forgot to mention this is available from my github:
https://github.com/crymson/piglit.git simplify_subtests


On Tuesday, November 05, 2013 10:34:49 AM Dylan Baker wrote:
> This series attempts to fix the way piglit handles subtests. In
> particular there are two problems with subtests:
>  1. A subtest failure does not cause the test it is a part of to be a
> failure
>  2. Each subtest writes an additional copy of itself in the json
> 
> Patch 1 attempts to correct point 1
> The primary problem with tests not failing when their subtests fail is
> that it is inconsistent with the rest of piglit; a group's status is
> that of it's lowest test or subgroup.
> 
> Patch 2 corrects point 2
> Since tests with subtests are now groups, there is no need to write an
> entry for each subtests. This reduces the size the json generated by
> ~80% (That's 1/5 of the original size). This is significant not just for
> the space savings, but because writing files is expensive.


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] gs: Test redeclaring either gl_PerVertex in or out, and using both.

2013-11-11 Thread Paul Berry
On 6 November 2013 14:06, Ian Romanick  wrote:

> On 10/15/2013 03:53 PM, Paul Berry wrote:
>
> This test is
>
> Reviewed-by: Ian Romanick 
>
> Do we already have tests that redeclare these blocks but try to use
> fields that were not in the redeclaration?
>

Yes:
- gs-redeclares-pervertex-in-before-other-usage.geom
- gs-redeclares-pervertex-out-before-other-usage.geom
- vs-redeclares-pervertex-out-before-other-usage.vert


>
> > ---
> >  .../gs-redeclares-pervertex-in-only.shader_test| 55
> ++
> >  .../gs-redeclares-pervertex-out-only.shader_test   | 53
> +
> >  2 files changed, 108 insertions(+)
> >  create mode 100644
> tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-in-only.shader_test
> >  create mode 100644
> tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-out-only.shader_test
> >
> > diff --git
> a/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-in-only.shader_test
> b/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-in-only.shader_test
> > new file mode 100644
> > index 000..f28bd7f
> > --- /dev/null
> > +++
> b/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-in-only.shader_test
> > @@ -0,0 +1,55 @@
> > +# This test verifies that a geometry shader can redeclare just the
> > +# gl_PerVertex input block, but still use members of the gl_PerVertex
> > +# output block (whether or not those members were included in the
> > +# redeclaration of the input block).
> > +
> > +[require]
> > +GLSL >= 1.50
> > +
> > +[vertex shader]
> > +in vec4 piglit_vertex;
> > +out gl_PerVertex {
> > +  vec4 gl_Position;
> > +};
> > +
> > +void main()
> > +{
> > +  gl_Position = piglit_vertex;
> > +}
> > +
> > +[geometry shader]
> > +layout(triangles) in;
> > +layout(triangle_strip, max_vertices = 3) out;
> > +
> > +in gl_PerVertex {
> > +  vec4 gl_Position;
> > +} gl_in[];
> > +
> > +void main()
> > +{
> > +  for (int i = 0; i < 3; i++) {
> > +gl_Position = gl_in[i].gl_Position;
> > +gl_ClipDistance[0] = 1.0;
> > +EmitVertex();
> > +  }
> > +}
> > +
> > +[fragment shader]
> > +void main()
> > +{
> > +  if (gl_ClipDistance[0] == 1.0)
> > +gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
> > +  else
> > +gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
> > +}
> > +
> > +[test]
> > +# Since the fragment shader's gl_ClipDistance array is only defined
> > +# for elements that have clipping enabled, we need to enable clip
> > +# plane 0.  Fortunately the values we use for gl_ClipDistance are
> > +# always positive, so no pixels are actually clipped.
> > +enable GL_CLIP_PLANE0
> > +clear color 0.0 0.0 0.0 0.0
> > +clear
> > +draw rect -1 -1 2 2
> > +probe all rgba 0.0 1.0 0.0 1.0
> > diff --git
> a/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-out-only.shader_test
> b/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-out-only.shader_test
> > new file mode 100644
> > index 000..e3f3dbd
> > --- /dev/null
> > +++
> b/tests/spec/glsl-1.50/execution/gs-redeclares-pervertex-out-only.shader_test
> > @@ -0,0 +1,53 @@
> > +# This test verifies that a geometry shader can redeclare just the
> > +# gl_PerVertex output block, but still use members of the gl_PerVertex
> > +# input block (whether or not those members were included in the
> > +# redeclaration of the output block).
> > +
> > +[require]
> > +GLSL >= 1.50
> > +
> > +[vertex shader]
> > +in vec4 piglit_vertex;
> > +
> > +void main()
> > +{
> > +  gl_Position = piglit_vertex;
> > +  gl_PointSize = dot(piglit_vertex, vec4(1.0));
> > +}
> > +
> > +[geometry shader]
> > +layout(triangles) in;
> > +layout(triangle_strip, max_vertices = 3) out;
> > +
> > +out gl_PerVertex {
> > +  vec4 gl_Position;
> > +};
> > +out vec4 color;
> > +
> > +void main()
> > +{
> > +  bool ok = true;
> > +  for (int i = 0; i < 3; i++) {
> > +if (gl_in[i].gl_PointSize != dot(gl_in[i].gl_Position, vec4(1.0)))
> > +  ok = false;
> > +  }
> > +  for (int i = 0; i < 3; i++) {
> > +gl_Position = gl_in[i].gl_Position;
> > +color = ok ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
> > +EmitVertex();
> > +  }
> > +}
> > +
> > +[fragment shader]
> > +in vec4 color;
> > +
> > +void main()
> > +{
> > +  gl_FragColor = color;
> > +}
> > +
> > +[test]
> > +clear color 0.0 0.0 0.0 0.0
> > +clear
> > +draw rect -1 -1 2 2
> > +probe all rgba 0.0 1.0 0.0 1.0
> >
>
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] Fix improperly-named geometry shader tests.

2013-11-11 Thread Paul Berry
Several geometry shader tests were improperly added to all.tests with
names like "spec/glsl-1.50/glsl-1.50-geometry-foo" instead of
"spec/glsl-1.50/execution/geometry/foo".  This patch renames the tests
to follow our usual piglit conventions.
---
 tests/all.tests | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index af5dcf3..9df7b11 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -994,20 +994,22 @@ spec['glsl-3.30']['built-in constants'] = 
concurrent_test('built-in-constants te
 # maximum number of geometry shader output vertices supported by the
 # hardware.
 for i in [31, 32, 33, 34, 127, 128, 129, 130, 0]:
-add_concurrent_test(spec['glsl-1.50'],
-'glsl-1.50-geometry-end-primitive {0}'.format(i))
+cmdline = 'end-primitive {0}'.format(i)
+spec['glsl-1.50']['execution']['geometry'][cmdline] = \
+concurrent_test('glsl-1.50-geometry-' + cmdline)
 
 for prim_type in ['GL_POINTS', 'GL_LINE_LOOP', 'GL_LINE_STRIP', 'GL_LINES',
   'GL_TRIANGLES', 'GL_TRIANGLE_STRIP', 'GL_TRIANGLE_FAN',
   'GL_LINES_ADJACENCY', 'GL_LINE_STRIP_ADJACENCY',
   'GL_TRIANGLES_ADJACENCY', 'GL_TRIANGLE_STRIP_ADJACENCY']:
-add_concurrent_test(spec['glsl-1.50'],
-'glsl-1.50-geometry-primitive-types {0}'.format(
-prim_type))
+cmdline = 'primitive-types {0}'.format(prim_type)
+spec['glsl-1.50']['execution']['geometry'][cmdline] = \
+concurrent_test('glsl-1.50-geometry-' + cmdline)
 for restart_index in ['ffs', 'other']:
-add_concurrent_test(spec['glsl-1.50'],
-'glsl-1.50-geometry-primitive-id-restart {0} 
{1}'.format(
-prim_type, restart_index))
+cmdline = 'primitive-id-restart {0} {1}'.format(
+prim_type, restart_index)
+spec['glsl-1.50']['execution']['geometry'][cmdline] = \
+concurrent_test('glsl-1.50-geometry-' + cmdline)
 
 for layout_type in ['points', 'lines', 'lines_adjacency', 'triangles',
'triangles_adjacency']:
@@ -1017,9 +1019,10 @@ for layout_type in ['points', 'lines', 
'lines_adjacency', 'triangles',
 
 for prim_type in ['GL_TRIANGLE_STRIP', 'GL_TRIANGLE_STRIP_ADJACENCY']:
 for restart_index in ['ffs', 'other']:
-add_concurrent_test(spec['glsl-1.50'],
-
'glsl-1.50-geometry-tri-strip-ordering-with-prim-restart {0} {1}'.format(
-prim_type, restart_index))
+cmdline = 'tri-strip-ordering-with-prim-restart {0} {1}'.format(
+prim_type, restart_index)
+spec['glsl-1.50']['execution']['geometry'][cmdline] = \
+concurrent_test('glsl-1.50-geometry-' + cmdline)
 
 for input_layout in ['points', 'lines', 'lines_adjacency', 'triangles',
'triangles_adjacency', 'line_strip', 'triangle_strip']:
-- 
1.8.4.2

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


Re: [Piglit] [PATCH 2/2] query_renderer: Add test that compares values from glXQueryRendererIntegerMESA et al

2013-11-11 Thread Paul Berry
On 25 October 2013 11:13, Ian Romanick  wrote:

> From: Ian Romanick 
>
> Verifies that all values from glXQueryRendererIntegerMESA,
> glXQueryCurrentRendererIntegerMESA, glXQueryRendererStringMESA, and
> glXQueryCurrentRendererStringMESA can be queried.  It also verifies that
> each of the Current and non-Current versions returns the same value for
> each query.
>
> Signed-off-by: Ian Romanick 
> ---
> This test currently fails on Mesa master with the
> GLX_MESA_query_renderer patches on the mesa-dev list.  It appears that
> Adam's d101204 commit breaks some calls to glXMakeContextCurrent.  I'm
> tracking down the root cause of that problem now.  With that patch
> reverted, everything here passes.
>
>  tests/all.tests|   4 +
>  tests/spec/CMakeLists.txt  |   1 +
>  .../spec/glx_mesa_query_renderer/CMakeLists.gl.txt |  28 +++
>  tests/spec/glx_mesa_query_renderer/CMakeLists.txt  |   1 +
>  tests/spec/glx_mesa_query_renderer/coverage.c  | 275
> +
>  5 files changed, 309 insertions(+)
>  create mode 100644 tests/spec/glx_mesa_query_renderer/CMakeLists.gl.txt
>  create mode 100644 tests/spec/glx_mesa_query_renderer/CMakeLists.txt
>  create mode 100644 tests/spec/glx_mesa_query_renderer/coverage.c
>
> diff --git a/tests/all.tests b/tests/all.tests
> index e5e63e4..1d2a916 100644
> --- a/tests/all.tests
> +++ b/tests/all.tests
> @@ -468,6 +468,10 @@ oml_sync_control['swapbuffersmsc-return swap_interval
> 0'] = concurrent_test('glx
>  oml_sync_control['swapbuffersmsc-return swap_interval 1'] =
> concurrent_test('glx-oml-sync-control-swapbuffersmsc-return 1')
>  oml_sync_control['waitformsc'] =
> concurrent_test('glx-oml-sync-control-waitformsc')
>
> +mesa_query_renderer = Group()
> +glx['GLX_MESA_query_renderer'] = mesa_query_renderer
> +mesa_query_renderer['coverage'] =
> concurrent_test('glx-query-renderer-coverage')
> +
>  def texwrap_test(args):
>  test = PlainExecTest(['texwrap', '-fbo', '-auto'] + args)
>  test.runConcurrent = True
> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
> index 18b846d..a2903d8 100644
> --- a/tests/spec/CMakeLists.txt
> +++ b/tests/spec/CMakeLists.txt
> @@ -77,6 +77,7 @@ add_subdirectory (gles-2.0)
>  add_subdirectory (gles-3.0)
>  add_subdirectory (glx_arb_create_context)
>  add_subdirectory (glx_ext_import_context)
> +add_subdirectory (glx_mesa_query_renderer)
>  add_subdirectory (glx_oml_sync_control)
>  add_subdirectory (arb_vertex_type_2_10_10_10_rev)
>  add_subdirectory (ext_texture_array)
> diff --git a/tests/spec/glx_mesa_query_renderer/CMakeLists.gl.txt
> b/tests/spec/glx_mesa_query_renderer/CMakeLists.gl.txt
> new file mode 100644
> index 000..f51ceff
> --- /dev/null
> +++ b/tests/spec/glx_mesa_query_renderer/CMakeLists.gl.txt
> @@ -0,0 +1,28 @@
> +
> +include_directories(
> +   ${GLEXT_INCLUDE_DIR}
> +   ${OPENGL_INCLUDE_PATH}
> +)
> +
> +if(PIGLIT_BUILD_GLX_TESTS)
> +link_libraries (
> +piglitglxutil
> +)
> +endif(PIGLIT_BUILD_GLX_TESTS)
> +
> +link_libraries (
> +   ${OPENGL_gl_LIBRARY}
> +   ${OPENGL_glu_LIBRARY}
> +)
> +
> +IF(PIGLIT_BUILD_GLX_TESTS)
> +   include_directories(
> +   ${GLPROTO_INCLUDE_DIRS}
> +   )
> +   link_libraries (
> +   ${X11_X11_LIB}
> +   )
> +   piglit_add_executable (glx-query-renderer-coverage coverage.c
> query-renderer-common.c)
> +ENDIF(PIGLIT_BUILD_GLX_TESTS)
> +
> +# vim: ft=cmake:
> diff --git a/tests/spec/glx_mesa_query_renderer/CMakeLists.txt
> b/tests/spec/glx_mesa_query_renderer/CMakeLists.txt
> new file mode 100644
> index 000..144a306
> --- /dev/null
> +++ b/tests/spec/glx_mesa_query_renderer/CMakeLists.txt
> @@ -0,0 +1 @@
> +piglit_include_target_api()
> diff --git a/tests/spec/glx_mesa_query_renderer/coverage.c
> b/tests/spec/glx_mesa_query_renderer/coverage.c
> new file mode 100644
> index 000..2f5367c
> --- /dev/null
> +++ b/tests/spec/glx_mesa_query_renderer/coverage.c
> @@ -0,0 +1,275 @@
> +/* Copyright © 2013 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the
> "Software"),
> + * to deal in the Software without restriction, including without
> limitation
> + * the rights to use, copy, modify, merge, publish, distribute,
> sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the
> next
> + * paragraph) shall be included in all copies or substantial portions of
> the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> S

Re: [Piglit] [PATCH 1/2] query_renderer: Add some common infrastructure for GLX_MESA_query_renderer tests

2013-11-11 Thread Paul Berry
On 25 October 2013 11:13, Ian Romanick  wrote:

> From: Ian Romanick 
>
> All of the tests for this extension will require a bunch of function
> pointers, etc.  This patch adds a function to get these function
> pointers and some macros to wrap calls using them.
>
> Signed-off-by: Ian Romanick 
> ---
>  .../query-renderer-common.c| 70
> +
>  .../query-renderer-common.h| 72
> ++
>  2 files changed, 142 insertions(+)
>  create mode 100644
> tests/spec/glx_mesa_query_renderer/query-renderer-common.c
>  create mode 100644
> tests/spec/glx_mesa_query_renderer/query-renderer-common.h
>
> diff --git a/tests/spec/glx_mesa_query_renderer/query-renderer-common.c
> b/tests/spec/glx_mesa_query_renderer/query-renderer-common.c
> new file mode 100644
> index 000..429f360
> --- /dev/null
> +++ b/tests/spec/glx_mesa_query_renderer/query-renderer-common.c
> @@ -0,0 +1,70 @@
> +/* Copyright © 2013 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the
> "Software"),
> + * to deal in the Software without restriction, including without
> limitation
> + * the rights to use, copy, modify, merge, publish, distribute,
> sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the
> next
> + * paragraph) shall be included in all copies or substantial portions of
> the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> DEALINGS
> + * IN THE SOFTWARE.
> + */
> +#include "piglit-util-gl-common.h"
> +#include "piglit-glx-util.h"
> +#include "query-renderer-common.h"
> +
> +PFNGLXQUERYRENDERERSTRINGMESAPROC __piglit_glXQueryRendererStringMESA =
> NULL;
> +PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC
> __piglit_glXQueryCurrentRendererStringMESA = NULL;
> +PFNGLXQUERYRENDERERINTEGERMESAPROC __piglit_glXQueryRendererIntegerMESA =
> NULL;
> +PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC
> __piglit_glXQueryCurrentRendererIntegerMESA = NULL;
> +PFNGLXCREATECONTEXTATTRIBSARBPROC __piglit_glXCreateContextAttribsARB =
> NULL;
>

Identifiers beginning with "__" are reserved by ISO C.  Change these to
"piglit_glX..." and the patch is:

Reviewed-by: Paul Berry 
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] gl-3.1/minmax: require at least 0 in GL_NUM_COMPRESSED_TEXTURE_FORMATS

2013-11-11 Thread Ian Romanick
On 11/01/2013 04:56 PM, Marek Olšák wrote:
> The GL 4.4 spec counts the RGTC formats, so it looks like the ARB
> reverted the change from 4.2. NUM_COMPRESSED_TEXTURE_FORMATS should
> return at least 18 and the list of required formats is here:
> 
> COMPRESSED_RED_RGTC1
> COMPRESSED_SIGNED_RED_RGTC1
> COMPRESSED_RG_RGTC2
> COMPRESSED_SIGNED_RG_RGTC2
> COMPRESSED_RGBA_BPTC_UNORM
> COMPRESSED_SRGB_ALPHA_BPTC_UNORM
> COMPRESSED_RGB_BPTC_SIGNED_FLOAT
> COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT
> COMPRESSED_RGB8_ETC2
> COMPRESSED_SRGB8_ETC2
> COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
> COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
> COMPRESSED_RGBA8_ETC2_EAC
> COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
> COMPRESSED_R11_EAC
> COMPRESSED_SIGNED_R11_EAC
> COMPRESSED_RG11_EAC
> COMPRESSED_SIGNED_RG11_EAC
> 
> I think Mesa supports all but BPTC, so it should return at least 14
> with the ES3 extension, right?

It shouldn't count any of the RED or RG formats because they're not
general purpose.  I don't think it should count the ETC formats because
I don't think the driver is required to provide a compressor for those
formats.  The BPTC formats probably should get counted, but the query
was deprecated... so I don't know what that means for new formats that
previously would have been counted.

This is one of those things in OpenGL that should never have been born.
 I came into the ARB just after most of the ARB_texture_compression
design was done, so that one isn't my fault. :)

> Marek
> 
> On Fri, Nov 1, 2013 at 9:09 PM, Ian Romanick  wrote:
>> On 11/01/2013 10:20 AM, Marek Olšák wrote:
>>> From: Marek Olšák 
>>>
>>> ---
>>>  tests/spec/gl-3.1/minmax.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tests/spec/gl-3.1/minmax.c b/tests/spec/gl-3.1/minmax.c
>>> index 1128939..c965ebe 100644
>>> --- a/tests/spec/gl-3.1/minmax.c
>>> +++ b/tests/spec/gl-3.1/minmax.c
>>> @@ -79,7 +79,9 @@ piglit_init(int argc, char **argv)
>>>   piglit_test_range_float(GL_POINT_SIZE_RANGE, 1, 1);
>>>   piglit_test_range_float(GL_ALIASED_LINE_WIDTH_RANGE, 1, 1);
>>>   piglit_test_range_float(GL_SMOOTH_LINE_WIDTH_RANGE, 1, 1);
>>> - piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 4);
>>> + /* The spec lists 4, but the number should be 0, because hw drivers
>>> +  * don't have to expose any non-core extensions like S3TC. */
>>> + piglit_test_min_int(GL_NUM_COMPRESSED_TEXTURE_FORMATS, 0);
>>
>> It said 4 because someone mistakenly counted the RGTC formats.  Also
>> worth noting is that the mistake was fixed in GL 4.2.
>>
>> With that changed,
>>
>> Reviewed-by: Ian Romanick 
>>
>> I guess tests/spec/gl-3.2/minmax.c and tests/spec/gl-3.3/minmax.c
>> probably need the same fix?
>>
>>>   piglit_test_min_int(GL_MAX_TEXTURE_BUFFER_SIZE, 65536);
>>>   piglit_test_min_int(GL_MAX_RECTANGLE_TEXTURE_SIZE, 1024);

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


[Piglit] [PATCH 2/2] igt: Enable dmesg checking by default

2013-11-11 Thread Daniel Vetter
An awful lot of tests rely on in-kernel checks to detect issues. So
we better make them fail properly.

Note that the dmesg check relies on dmesg timestamps to work correctly.
If you don't have them it won't work.

Cc: Paulo Zanoni 
---
 tests/igt.tests | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/igt.tests b/tests/igt.tests
index 0f19c82..1d0da50 100644
--- a/tests/igt.tests
+++ b/tests/igt.tests
@@ -60,6 +60,9 @@ class IGTTest(ExecTest):
else:
results['result'] = 'dmesg-fail' if dmesg != '' else 'fail'
return out
+def run(self, env):
+env.dmesg = True
+return ExecTest.run(self, env)
 
 def listTests(listname):
 oldDir = os.getcwd()
-- 
1.8.1.4

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


[Piglit] [PATCH 1/2] framework: Ignore info/debug dmesg output

2013-11-11 Thread Daniel Vetter
i-g-t has a bunch of testcase that cause informational output. In
addition I usually enable drm debugging on my machines, so the
kms tests cause massive amounts of spew.

I've thought whether an option would be useful, but then I didn't
really see any reason why we should ever care about debug/info
messages. Hence the default.

Cc: Marek Olšák 
---
 framework/exectest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/exectest.py b/framework/exectest.py
index bfb33da..986d803 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -38,7 +38,7 @@ else:
 
 
 def read_dmesg():
-proc = subprocess.Popen('dmesg', stdout=subprocess.PIPE)
+proc = subprocess.Popen(['dmesg', '-l', 
'emerg,alert,crit,err,warn,notice'], stdout=subprocess.PIPE)
 return proc.communicate()[0].rstrip('\n')
 
 def get_dmesg_diff(old, new):
-- 
1.8.1.4

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


[Piglit] [PATCH] GL: Verify that when GL_COORD_REPLACE is set, fragment shader texture coordinates do not get eliminated.

2013-11-11 Thread Nicholas Mack
---
 tests/all.tests|   2 +-
 tests/spec/gl-3.2/CMakeLists.gl.txt|   3 +-
 ...oord-replace-doesnt-eliminate-frag-tex-coords.c | 135 +
 3 files changed, 138 insertions(+), 2 deletions(-)
 create mode 100644 
tests/spec/gl-3.2/gl-coord-replace-doesnt-eliminate-frag-tex-coords.c

diff --git a/tests/all.tests b/tests/all.tests
index af5dcf3..d34773b 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -765,7 +765,7 @@ spec['!OpenGL 3.2/layered-rendering/gl-layer'] = 
concurrent_test('gl-3.2-layered
 spec['!OpenGL 3.2/layered-rendering/gl-layer-cube-map'] = 
concurrent_test('gl-3.2-layered-rendering-gl-layer-cube-map')
 spec['!OpenGL 3.2/layered-rendering/gl-layer-not-layered'] = 
concurrent_test('gl-3.2-layered-rendering-gl-layer-not-layered')
 spec['!OpenGL 3.2/layered-rendering/gl-layer-render'] = 
concurrent_test('gl-3.2-layered-rendering-gl-layer-render')
-
+spec['!OpenGL/coord-replace-doesnt-eliminate-frag-tex-coords'] = 
concurrent_test('gl-coord-replace-doesnt-eliminate-frag-tex-coords')
 spec['!OpenGL/get-active-attrib-returns-all-inputs'] = 
concurrent_test('gl-get-active-attrib-returns-all-inputs')
 spec['!OpenGL 3.2/texture-border-deprecated'] = 
concurrent_test('gl-3.2-texture-border-deprecated')
 
diff --git a/tests/spec/gl-3.2/CMakeLists.gl.txt 
b/tests/spec/gl-3.2/CMakeLists.gl.txt
index 1457681..c8725be 100644
--- a/tests/spec/gl-3.2/CMakeLists.gl.txt
+++ b/tests/spec/gl-3.2/CMakeLists.gl.txt
@@ -9,11 +9,12 @@ link_libraries (
${OPENGL_glu_LIBRARY}
 )
 
-piglit_add_executable (gl-get-active-attrib-returns-all-inputs 
get-active-attrib-returns-all-inputs.c)
 piglit_add_executable (gl-3.2-minmax minmax.c)
 piglit_add_executable (gl-3.2-clear-no-buffers clear-no-buffers.c)
 piglit_add_executable (gl-3.2-get-buffer-parameter-i64v 
get-buffer-parameter-i64v.c)
 piglit_add_executable (gl-3.2-get-integer-64iv get-integer-64iv.c)
 piglit_add_executable (gl-3.2-get-integer-64v get-integer-64v.c)
 piglit_add_executable (gl-3.2-texture-border-deprecated 
texture-border-deprecated.c)
+piglit_add_executable (gl-coord-replace-doesnt-eliminate-frag-tex-coords 
gl-coord-replace-doesnt-eliminate-frag-tex-coords)
+piglit_add_executable (gl-get-active-attrib-returns-all-inputs 
get-active-attrib-returns-all-inputs.c)
 # vim: ft=cmake:
diff --git 
a/tests/spec/gl-3.2/gl-coord-replace-doesnt-eliminate-frag-tex-coords.c 
b/tests/spec/gl-3.2/gl-coord-replace-doesnt-eliminate-frag-tex-coords.c
new file mode 100644
index 000..b07327c
--- /dev/null
+++ b/tests/spec/gl-3.2/gl-coord-replace-doesnt-eliminate-frag-tex-coords.c
@@ -0,0 +1,135 @@
+/**
+ * Copyright © 2013 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * Verify that when GL_COORD_REPLACE is set, fragment shader texture
+ * coordinates (via the gl_TexCoord built-ins) don't get eliminated.
+ */
+
+#include "piglit-util-gl-common.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+   config.supports_gl_compat_version = 21;
+
+   config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+
+PIGLIT_GL_TEST_CONFIG_END
+
+static const char *vstext =
+   "#version 130\n"
+   "in vec3 vertex;\n"
+   "void main() {\n"
+   "   gl_Position = vec4(vertex, 1.);\n"
+   "   gl_PointSize = 16;\n"
+   "}\n";
+
+static const char *fstext =
+   "#version 130\n"
+   "void main() {\n"
+   "   gl_FragColor = gl_TexCoord[0];\n"
+   "}\n";
+
+static GLuint vao;
+static GLuint vertBuff;
+static GLuint indexBuf;
+
+static GLfloat vertices[] = {
+   0.0, 0.0, 0.0
+};
+static GLsizei vertSize = sizeof(vertices);
+
+static GLuint indices[] = {
+   0
+};
+static GLsizei indSize = sizeof(indices);
+
+static GLuint prog;
+
+void
+piglit_init(int argc, char **argv)
+{
+   GLuint vertIndex;
+
+   prog = piglit_build_simple_program(vstext, fstext);

Re: [Piglit] [PATCH] ARB_texture_view: Add multisample texture target testing

2013-11-11 Thread Brian Paul

On 11/08/2013 01:40 PM, Jon Ashburn wrote:

The "targets"  test is extended to include testing of
GL_TEXTURE_2D_MULTISAMPLE and GL_TEXTURE_2D_MULTISAMPLE_ARRAY.
This will test making valid and invalid texture views of these two
multisample targets and ensuring the correct GL error is set.
---
  tests/spec/arb_texture_view/targets.c | 28 +---
  1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/tests/spec/arb_texture_view/targets.c 
b/tests/spec/arb_texture_view/targets.c
index 2c2e5c5..18ea5aa 100644
--- a/tests/spec/arb_texture_view/targets.c
+++ b/tests/spec/arb_texture_view/targets.c
@@ -96,7 +96,6 @@ test_target_errors(GLenum target)
GLenum legalTargets[4];
unsigned int numTargets;
GLenum illegalTargets[] = {
-   /* skip multisample */
GL_TEXTURE_1D,
GL_TEXTURE_2D,
GL_TEXTURE_3D,
@@ -105,6 +104,8 @@ test_target_errors(GLenum target)
GL_TEXTURE_1D_ARRAY,
GL_TEXTURE_2D_ARRAY,
GL_TEXTURE_CUBE_MAP_ARRAY,
+   GL_TEXTURE_2D_MULTISAMPLE,
+   GL_TEXTURE_2D_MULTISAMPLE_ARRAY
};

glGenTextures(1, &tex);   /* orig tex */
@@ -113,8 +114,7 @@ test_target_errors(GLenum target)
switch (target) {
case GL_TEXTURE_1D:
glTexStorage1D(target, levels, GL_RGBA8, width);
-   numTargets = 2;
-   update_valid_arrays(legalTargets, illegalTargets,
+   numTargets = update_valid_arrays(legalTargets, illegalTargets,
ARRAY_SIZE(illegalTargets),
GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, 0);
break;
@@ -161,6 +161,22 @@ test_target_errors(GLenum target)
GL_TEXTURE_2D_ARRAY,
GL_TEXTURE_CUBE_MAP_ARRAY, 0);
break;
+   case GL_TEXTURE_2D_MULTISAMPLE:
+   glTexStorage2DMultisample(target, 2, GL_RGBA8, width, height,
+ GL_TRUE);
+   numTargets = update_valid_arrays(legalTargets, illegalTargets,
+   ARRAY_SIZE(illegalTargets),
+   GL_TEXTURE_2D_MULTISAMPLE,
+   GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0);
+   break;
+   case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
+   glTexStorage3DMultisample(target, 4, GL_RGBA8, width, height,
+ depth, GL_TRUE);
+   numTargets = update_valid_arrays(legalTargets, illegalTargets,
+   ARRAY_SIZE(illegalTargets),
+   GL_TEXTURE_2D_MULTISAMPLE,
+   GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 0);
+   break;
default:
assert(0);
break;
@@ -212,6 +228,8 @@ piglit_init(int argc, char **argv)
piglit_require_extension("GL_ARB_texture_cube_map_array");
piglit_require_extension("GL_EXT_texture_array");
piglit_require_extension("GL_ARB_texture_rectangle");
+   piglit_require_extension("GL_ARB_texture_storage_multisample");


Could you make the dependency optional?

In update_valid_arrays() could you disable the multisample texture 
targets if GL_ARB_texture_storage_multisample isn't supported.


I have a feeling we'll have ARB_texture_view before we have 
ARB_texture_storage_multisample in the gallium drivers.


-Brian

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


[Piglit] [PATCH] CL: Fix memory leak in parse_name

2013-11-11 Thread Aaron Watry
We need to free a regex after compiling/executing it.
---
 tests/cl/program/program-tester.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/cl/program/program-tester.c 
b/tests/cl/program/program-tester.c
index be6bc20..31aeec9 100644
--- a/tests/cl/program/program-tester.c
+++ b/tests/cl/program/program-tester.c
@@ -1132,6 +1132,8 @@ parse_name(const char *input)
input, bad_char);
return NULL;
}
+
+   regfree(®ex);
return name;
 }
 
-- 
1.8.3.2

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