[Piglit] [PATCH 2/2] arb_enhanced_layouts: add more xfb_stride compile tests

2016-05-18 Thread Timothy Arceri
---
 .../xfb_stride/block-stride-overflow.vert  | 24 
 .../xfb_stride/named-block-stride-overflow.vert| 24 
 .../xfb_stride/variable-implicit-too-large.vert| 22 ++
 .../variable-stride-mismatch-global.vert   | 26 ++
 .../xfb_stride/variable-stride-mismatch.vert   | 24 
 .../xfb_stride/variable-stride-overflow.vert   | 24 
 6 files changed, 144 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-overflow.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-overflow.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-implicit-too-large.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch.vert
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-overflow.vert

diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-overflow.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-overflow.vert
new file mode 100644
index 000..2560baf
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/block-stride-overflow.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//"It is a compile-time or link-time error to have any *xfb_offset*
+//that overflows *xfb_stride*, whether stated on declarations before or
+//after the *xfb_stride*, or in different compilation units."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_offset = 16, xfb_stride = 20) out block {
+  vec4 var;
+};
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-overflow.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-overflow.vert
new file mode 100644
index 000..4558bea
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/named-block-stride-overflow.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//"It is a compile-time or link-time error to have any *xfb_offset*
+//that overflows *xfb_stride*, whether stated on declarations before or
+//after the *xfb_stride*, or in different compilation units."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout (xfb_offset = 16, xfb_stride = 20) out block {
+  vec4 var;
+} b1;
+
+void main()
+{
+  b1.var = vec4(1.0);
+}
diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-implicit-too-large.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-implicit-too-large.vert
new file mode 100644
index 000..f3b1db0
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-implicit-too-large.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// require_extensions: GL_ARB_enhanced_layouts
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//"The resulting stride (implicit or explicit) must be less than or equal
+//to the implementation-dependent constant
+//gl_MaxTransformFeedbackInterleavedComponents."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+
+layout(xfb_offset = (gl_MaxTransformFeedbackInterleavedComponents * 4) - 12) 
out vec4 var;
+
+void main()
+{
+  var = vec4(1.0);
+}
diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
new file mode 100644
index 000..b8184ba
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_stride/variable-stride-mismatch-global.vert
@@ -0,0 +1,26 @@
+// [config]
+// 

[Piglit] [PATCH 1/2] arb_enhanced_layouts: additional xfb_offset test

2016-05-18 Thread Timothy Arceri
---
 .../invalid-nested-struct-with-double.vert | 34 ++
 1 file changed, 34 insertions(+)
 create mode 100644 
tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert

diff --git 
a/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert
 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert
new file mode 100644
index 000..21afe15
--- /dev/null
+++ 
b/tests/spec/arb_enhanced_layouts/compiler/transform-feedback-layout-qualifiers/xfb_offset/invalid-nested-struct-with-double.vert
@@ -0,0 +1,34 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_enhanced_layouts GL_ARB_gpu_shader_fp64
+
+// [end config]
+//
+// From the GL_ARB_enhanced_layouts spec:
+//
+//"The offset must be a multiple of the size of the first component of the
+//first qualified variable or block member, or a compile-time error
+//results. Further, if applied to an aggregate containing a double, the
+//offset must also be a multiple of 8, and the space taken in the buffer
+//will be a multiple of 8."
+
+#version 150
+#extension GL_ARB_enhanced_layouts: require
+#extension GL_ARB_gpu_shader_fp64: require
+
+struct S1 {
+  float x1;
+  double y;
+};
+
+struct S2 {
+  float x2;
+  S1 s;
+};
+
+layout(xfb_offset = 4) out S2 s;
+
+void main()
+{
+}
-- 
2.5.5

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


Re: [Piglit] [PATCH 0/4] Additional tests for ARB_vertex_attrib_64bit extension

2016-05-18 Thread Dave Airlie
On 18 May 2016 at 09:31, Andres Gomez  wrote:
> This series provides additional tests for the ARB_vertex_attrib_64bit
> extension:
>
> https://www.opengl.org/registry/specs/ARB/vertex_attrib_64bit.txt
>
> This work is complemented with the corresponding bug to add support
> for this extension into the i965 shader backend at:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=94442
>
> Cheers,
> Andres (on behalf of the team that worked on this).

I've had a quick look, so

Acked-by: Dave Airlie 

>
> Alejandro Piñeiro (2):
>   arb_vertex_attrib_64bit: add getactiveattrib test
>   arb_vertex_attrib_64bit: add MAX_VERTEX_ATTRIB test
>
> Andres Gomez (1):
>   arb_vertex_attrib_64bit: Adds double vertex input tests generator
>
> Antia Puentes (1):
>   arb_vertex_attrib_64bit: add overlapping locations test
>
>  generated_tests/CMakeLists.txt |   9 +
>  generated_tests/gen_vs_in_fp64.py  | 380 
> +
>  generated_tests/templates/gen_vs_in_fp64/base.mako |  27 ++
>  .../columns_execution.vert.shader_test.mako|  41 +++
>  .../gen_vs_in_fp64/columns_shader.vert.mako|  17 +
>  .../gen_vs_in_fp64/execution.vert.shader_test.mako |  32 ++
>  .../templates/gen_vs_in_fp64/execution_base.mako   |  85 +
>  .../regular_execution.vert.shader_test.mako|  67 
>  .../gen_vs_in_fp64/regular_shader.vert.mako|  19 ++
>  .../templates/gen_vs_in_fp64/shader.vert.mako  |  16 +
>  .../templates/gen_vs_in_fp64/shader_base.mako  |  12 +
>  tests/all.py   |   5 +
>  .../execution/CMakeLists.gl.txt|   3 +
>  .../execution/getactiveattrib.c| 345 +++
>  .../execution/max-vertex-attrib.c  | 123 +++
>  .../execution/overlapping-locations.c  | 226 
>  .../execution/vs-dvec3-input.shader_test   |  37 --
>  17 files changed, 1407 insertions(+), 37 deletions(-)
>  create mode 100644 generated_tests/gen_vs_in_fp64.py
>  create mode 100644 generated_tests/templates/gen_vs_in_fp64/base.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/columns_execution.vert.shader_test.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/columns_shader.vert.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/execution.vert.shader_test.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/execution_base.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/regular_execution.vert.shader_test.mako
>  create mode 100644 
> generated_tests/templates/gen_vs_in_fp64/regular_shader.vert.mako
>  create mode 100644 generated_tests/templates/gen_vs_in_fp64/shader.vert.mako
>  create mode 100644 generated_tests/templates/gen_vs_in_fp64/shader_base.mako
>  create mode 100644 
> tests/spec/arb_vertex_attrib_64bit/execution/getactiveattrib.c
>  create mode 100644 
> tests/spec/arb_vertex_attrib_64bit/execution/max-vertex-attrib.c
>  create mode 100644 
> tests/spec/arb_vertex_attrib_64bit/execution/overlapping-locations.c
>  delete mode 100644 
> tests/spec/arb_vertex_attrib_64bit/execution/vs-dvec3-input.shader_test
>
> --
> 2.8.1
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests: Add integration with Khronos CTS OpenGL runner

2016-05-18 Thread Dylan Baker
Quoting Juan A. Suarez Romero (2016-05-18 09:27:34)
> On Wed, 2016-05-18 at 09:20 -0700, Dylan Baker wrote:
> > Quoting Juan A. Suarez Romero (2016-05-18 06:34:07)
> > > This adds support for running Khronos' deqp-based conformance suite
> > for
> > > OpenGL with piglit.
> > > ---
> > >  piglit.conf.example | 10 ++
> > >  tests/{cts.py => cts_gl45.py}   | 43 +--
> > --
> > >  tests/{cts.py => cts_gles31.py} |  2 +-
> > 
> > Since these run all of the tests I think I'd prefer cts_gles and
> > cts_gl,
> > but that's a bit of a nit-pick.
> 
> What about the envvars / piglit.conf?
> 
> I keep PIGLIT_CTS_BIN for gles, while using PIGLIT_CTS_GL_BIN for gl.
> 
> Does it make sense to rename the envvar and use also
> PIGLIT_CTS_GLES_BIN / PIGLIT_CTS_GLES_EXTRA_ARGS for gles, and
> PIGLIT_CTS_GL_BIN / PIGLIT_CTS_GL_EXTRA_ARGS for gl?
> 
> 
> J.A.

I'm 50/50 on it. While I think it probably is nicer to change them, it
also creates more churn for people using the functionality.

My r-b remains whichever way you decide to go.

Dylan


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


Re: [Piglit] [PATCH] tests: Add integration with Khronos CTS OpenGL runner

2016-05-18 Thread Juan A. Suarez Romero
On Wed, 2016-05-18 at 09:20 -0700, Dylan Baker wrote:
> Quoting Juan A. Suarez Romero (2016-05-18 06:34:07)
> > This adds support for running Khronos' deqp-based conformance suite
> for
> > OpenGL with piglit.
> > ---
> >  piglit.conf.example | 10 ++
> >  tests/{cts.py => cts_gl45.py}   | 43 +--
> --
> >  tests/{cts.py => cts_gles31.py} |  2 +-
> 
> Since these run all of the tests I think I'd prefer cts_gles and
> cts_gl,
> but that's a bit of a nit-pick.

What about the envvars / piglit.conf?

I keep PIGLIT_CTS_BIN for gles, while using PIGLIT_CTS_GL_BIN for gl.

Does it make sense to rename the envvar and use also
PIGLIT_CTS_GLES_BIN / PIGLIT_CTS_GLES_EXTRA_ARGS for gles, and
PIGLIT_CTS_GL_BIN / PIGLIT_CTS_GL_EXTRA_ARGS for gl?


J.A.


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


[Piglit] [PATCH] tests: Add integration with Khronos CTS OpenGL runner

2016-05-18 Thread Juan A. Suarez Romero
This adds support for running Khronos' deqp-based conformance suite for
OpenGL with piglit.
---
 piglit.conf.example | 10 ++
 tests/{cts.py => cts_gl45.py}   | 43 +
 tests/{cts.py => cts_gles31.py} |  2 +-
 3 files changed, 37 insertions(+), 18 deletions(-)
 copy tests/{cts.py => cts_gl45.py} (56%)
 rename tests/{cts.py => cts_gles31.py} (97%)

diff --git a/piglit.conf.example b/piglit.conf.example
index 944d5d9..3cce52a 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -95,6 +95,16 @@ testB
 ; overrides the value set here.
 ;extra_args=--deqp-visibility hidden
 
+[cts_gl]
+; path to the cts opengl executable
+; can be overwritten by PIGLIT_CTS_GL_BIN environment variable
+;bin=/home/knuth/cts/cts/glcts
+
+; Space-separated list of extra command line arguments for cts. The
+; option is not required. The environment variable PIGLIT_CTS_GL_EXTRA_ARGS
+; overrides the value set here.
+;extra_args=--deqp-visibility hidden
+
 ; Section for specific oclconform test.  One of these sections is required for
 ; each test list in the oclconform section and must be called:
 ; oclconform-$testname
diff --git a/tests/cts.py b/tests/cts_gl45.py
similarity index 56%
copy from tests/cts.py
copy to tests/cts_gl45.py
index 0e64e1b..607b79b 100644
--- a/tests/cts.py
+++ b/tests/cts_gl45.py
@@ -20,25 +20,24 @@
 
 """Piglit integration for Khronos CTS tests.
 
-By default this will run GLES2, GLES3, GLES31, and GLESEXT test cases. Those
-desiring to run only a subset of them should consider using the -t or -x
-options to include or exclude tests.
+By default this will run GL30, GL31, GL32, GL33, GL40, GL41, GL42, GL43, GL44
+and GL45 test cases. Those desiring to run only a subset of them should 
consider
+using the -t or -x options to include or exclude tests.
 
 For example:
-./piglit run cts -c foo -t ES3- would run only ES3 tests (note the dash to
-exclude ES31 tests)
+./piglit run cts_gl45 -c foo -t GL30- would run only GL30 tests
 
 This integration requires some configuration in piglit.conf, or the use of
 environment variables.
 
 In piglit.conf one should set the following:
-[cts]:bin -- Path to the glcts binary
-[cts]:extra_args -- any extra arguments to be passed to cts (optional)
+[cts_gl]:bin -- Path to the glcts binary
+[cts_gl]:extra_args -- any extra arguments to be passed to cts (optional)
 
 Alternatively (or in addition, since environment variables have precedence),
 one could set:
-PIGLIT_CTS_BIN -- environment equivalent of [cts]:bin
-PIGLIT_CTS_EXTRA_ARGS -- environment equivalent of [cts]:extra_args
+PIGLIT_CTS_GL_BIN -- environment equivalent of [cts_gl]:bin
+PIGLIT_CTS_GL_EXTRA_ARGS -- environment equivalent of [cts_gl]:extra_args
 
 """
 
@@ -51,9 +50,9 @@ from framework.test import deqp
 
 __all__ = ['profile']
 
-_CTS_BIN = deqp.get_option('PIGLIT_CTS_BIN', ('cts', 'bin'))
+_CTS_BIN = deqp.get_option('PIGLIT_CTS_GL_BIN', ('cts_gl', 'bin'))
 
-_EXTRA_ARGS = deqp.get_option('PIGLIT_CTS_EXTRA_ARGS', ('cts', 'extra_args'),
+_EXTRA_ARGS = deqp.get_option('PIGLIT_CTS_GL_EXTRA_ARGS', ('cts_gl', 
'extra_args'),
   default='').split()
 
 
@@ -65,18 +64,28 @@ class DEQPCTSTest(deqp.DEQPBaseTest):
 return super(DEQPCTSTest, self).extra_args + \
 [x for x in _EXTRA_ARGS if not x.startswith('--deqp-case')]
 
-
 # Add all of the suites by default, users can use filters to remove them.
 profile = deqp.make_profile(  # pylint: disable=invalid-name
 itertools.chain(
 deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_CTS_BIN, 'ES2-CTS-cases.txt', _EXTRA_ARGS)),
+deqp.gen_caselist_txt(_CTS_BIN, 'GL30-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL31-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL32-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL33-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL40-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL41-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_CTS_BIN, 'GL42-CTS-cases.txt', 
_EXTRA_ARGS)),
 deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_CTS_BIN, 'ES3-CTS-cases.txt', _EXTRA_ARGS)),
+deqp.gen_caselist_txt(_CTS_BIN, 'GL43-CTS-cases.txt', 
_EXTRA_ARGS)),
 deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_CTS_BIN, 'ES31-CTS-cases.txt', 
_EXTRA_ARGS)),
+deqp.gen_caselist_txt(_CTS_BIN, 'GL44-CTS-cases.txt', 
_EXTRA_ARGS)),
 deqp.iter_deqp_test_cases(
-deqp.gen_caselist_txt(_CTS_BIN, 'ESEXT-CTS-cases.txt',
-  

Re: [Piglit] [PATCH v2 0/2] More tests for multiple inout parameters

2016-05-18 Thread Juan A. Suarez Romero
On Mon, 2016-05-09 at 16:51 +0200, Juan A. Suarez Romero wrote:
> These tests cover two use cases:
> 
> - Indirect arrays (arrays indexed from other arrays)
> - Arrays of arrays (requires GL_ARB_arrays_of_arrays)
> 
> 
> Juan A. Suarez Romero (2):
>   Test multiple inout parameters with indirect array indexing
>   Test multiple inout parameters with arrays of arrays
> 


Gently pinging someone that could take a look.


J.A.

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


Re: [Piglit] [PATCH] shader_runner: Initialize gl_max_varying_components more often.

2016-05-18 Thread Kenneth Graunke
On Tuesday, May 17, 2016 6:09:26 PM PDT Eric Anholt wrote:
> Back in the day it was called MAX_VARYING_FLOATS, which is an alias
> for MAX_VARYING_COMPONENTS.  Fixes a bunch of varying-components tests
> skipping on vc4.
> ---
>  tests/shaders/shader_runner.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 239735cba1c9..b1d30185a29c 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -3326,7 +3326,8 @@ piglit_init(int argc, char **argv)
>   piglit_is_extension_supported("GL_ARB_vertex_shader"))
>   glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS,
> _max_vertex_uniform_components);
> - if (piglit_get_gl_version() >= 30 ||
> + if (piglit_get_gl_version() >= 20 ||
> + piglit_is_extension_supported("GL_ARB_vertex_shader") ||
>   piglit_is_extension_supported("GL_ARB_geometry_shader4") ||
>   piglit_is_extension_supported("GL_EXT_geometry_shader4"))
>   glGetIntegerv(GL_MAX_VARYING_COMPONENTS,
> 

Yep, MAX_VARYING_FLOATS does indeed alias MAX_VARYING_COMPONENTS and
existed in OpenGL 2.0.

Reviewed-by: Kenneth Graunke 


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