Constant cases pass while the non-constant vertex emission case crashes and the non-constant primitive end fails on NVIDIA (304.88 on GTX 660).
Signed-off-by: Topi Pohjolainen <[email protected]> --- tests/all.tests | 2 ++ .../primitive-end-with-const-int.geom | 26 ++++++++++++++++++++++ .../primitive-end-with-non-const-int.geom | 26 ++++++++++++++++++++++ .../vertex-stream-emit-with-const-int.geom | 26 ++++++++++++++++++++++ .../vertex-stream-emit-with-non-const-int.geom | 26 ++++++++++++++++++++++ 5 files changed, 106 insertions(+) create mode 100644 tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-const-int.geom create mode 100644 tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-non-const-int.geom create mode 100644 tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-const-int.geom create mode 100644 tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-non-const-int.geom diff --git a/tests/all.tests b/tests/all.tests index 6aa9b88..042ce13 100644 --- a/tests/all.tests +++ b/tests/all.tests @@ -1268,6 +1268,8 @@ spec['ARB_gpu_shader5'] = arb_gpu_shader5 add_shader_test_dir(arb_gpu_shader5, testsDir + '/spec/arb_gpu_shader5', recursive=True) +import_glsl_parser_tests(arb_gpu_shader5, + testsDir + '/spec/arb_gpu_shader5', ['']) arb_occlusion_query = Group() spec['ARB_occlusion_query'] = arb_occlusion_query diff --git a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-const-int.geom b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-const-int.geom new file mode 100644 index 0000000..9ce1c10 --- /dev/null +++ b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-const-int.geom @@ -0,0 +1,26 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * check_link: false + * require_extensions: GL_ARB_gpu_shader5 + * [end config] + * + * Tests compiler/parser: + * + * Section 8.10, Geometry Shader Functions says: + * "The argument <stream> must be a constant integral expression." + */ + +#version 150 +#extension GL_ARB_gpu_shader5: enable + +layout(points, max_vertices = 1, stream = 0) out; +layout(points, max_vertices = 1, stream = 1) out; + +void main() +{ + const int i = 0; + + gl_Position = vec4(0.0); + EndStreamPrimitive(i); +} diff --git a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-non-const-int.geom b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-non-const-int.geom new file mode 100644 index 0000000..57c29f4 --- /dev/null +++ b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/primitive-end-with-non-const-int.geom @@ -0,0 +1,26 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * check_link: false + * require_extensions: GL_ARB_gpu_shader5 + * [end config] + * + * Tests compiler/parser: + * + * Section 8.10, Geometry Shader Functions says: + * "The argument <stream> must be a constant integral expression." + */ + +#version 150 +#extension GL_ARB_gpu_shader5: enable + +layout(points, max_vertices = 1, stream = 0) out; +layout(points, max_vertices = 1, stream = 1) out; + +void main() +{ + int i = 0; + + gl_Position = vec4(0.0); + EndStreamPrimitive(i); +} diff --git a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-const-int.geom b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-const-int.geom new file mode 100644 index 0000000..80c3d90 --- /dev/null +++ b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-const-int.geom @@ -0,0 +1,26 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.50 + * check_link: false + * require_extensions: GL_ARB_gpu_shader5 + * [end config] + * + * Tests compiler/parser: + * + * Section 8.10, Geometry Shader Functions says: + * "The argument <stream> must be a constant integral expression." + */ + +#version 150 +#extension GL_ARB_gpu_shader5: enable + +layout(points, max_vertices = 1, stream = 0) out; +layout(points, max_vertices = 1, stream = 1) out; + +void main() +{ + const int i = 0; + + gl_Position = vec4(0.0); + EmitStreamVertex(i); +} diff --git a/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-non-const-int.geom b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-non-const-int.geom new file mode 100644 index 0000000..1935649 --- /dev/null +++ b/tests/spec/arb_gpu_shader5/compiler/builtin-functions/vertex-stream-emit-with-non-const-int.geom @@ -0,0 +1,26 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.50 + * check_link: false + * require_extensions: GL_ARB_gpu_shader5 + * [end config] + * + * Tests compiler/parser: + * + * Section 8.10, Geometry Shader Functions says: + * "The argument <stream> must be a constant integral expression." + */ + +#version 150 +#extension GL_ARB_gpu_shader5: enable + +layout(points, max_vertices = 1, stream = 0) out; +layout(points, max_vertices = 1, stream = 1) out; + +void main() +{ + int i = 0; + + gl_Position = vec4(0.0); + EmitStreamVertex(i); +} -- 1.8.3.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
