[Piglit] [PATCH] arb_tessellation_shader: Add test for unsized array with 2 shaders

Ilia Mirkin imirkin at alum.mit.edu
Wed Sep 17 22:33:59 PDT 2014


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Wed, Sep 17, 2014 at 5:18 AM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  ...utput-size-declared-in-other-shader.shader_test | 52 ++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
>
> diff --git a/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test b/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
> new file mode 100644
> index 0000000..50b33bf
> --- /dev/null
> +++ b/tests/spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader.shader_test
> @@ -0,0 +1,52 @@
> +# Not all shaders linked together are required to declare the output
> +# vertex count -- but those shaders which do not, must not call .length()
> +# or do anything else which requires the length of an unsized output array to
> +# be known.
> +
> +[require]
> +GLSL >= 1.50
> +GL_ARB_tessellation_shader
> +
> +[vertex shader]
> +
> +void main() {
> +}
> +
> +[tessellation control shader]
> +#extension GL_ARB_tessellation_shader: require
> +layout(vertices = 3) out;
> +
> +void f();
> +
> +void main() {
> +       gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 0.0);
> +       gl_TessLevelInner = float[2](0.0, 0.0);
> +
> +       f();
> +}
> +
> +[tessellation control shader]
> +#extension GL_ARB_tessellation_shader: require
> +
> +void f() {
> +       gl_out[gl_InvocationID].gl_Position = vec4(0);
> +}
> +
> +[tessellation evaluation shader]
> +#extension GL_ARB_tessellation_shader: require
> +
> +layout (triangles) in;
> +
> +void main() {
> +       gl_Position = vec4(0);
> +}
> +
> +[fragment shader]
> +void main()
> +{
> +       gl_FragColor = vec4(0);
> +}
> +
> +
> +[test]
> +link success
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list