[Piglit] [PATCH V2] arb_explicit_uniform_location: add more qualifier tests for subroutines
Tapani Pälli
tapani.palli at intel.com
Thu Nov 5 23:51:00 PST 2015
On 11/06/2015 04:32 AM, Timothy Arceri wrote:
> Test results:
>
> layout-subroutine-index-uniform.vert:
> Nvidia GeForce 840M - NVIDIA 346.47: pass
> Mesa 11.1-dev - pass
>
> layout-subroutine-location-function.vert:
> Nvidia GeForce 840M - NVIDIA 346.47: pass
> Mesa 11.1-dev - segfault
>
> layout-subroutine-location.vert:
> Nvidia GeForce 840M - NVIDIA 346.47: pass
> Mesa 11.1-dev - pass
>
> V2: It turns out there is what seems an artifical limitation where
> either GL_ARB_explicit_attrib_location or GLSL 330 is required for
> this extension. As Mesa implements this restriction for uniforms
> this is now added to the uniform tests.
Reason seems that layout qualifier 'location' comes only with GLSL >=
330 or with GL_ARB_explicit_attrib_location.
Tests look good to me;
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
> ---
> .../compiler/layout-subroutine-index-uniform.vert | 15 +++++++++++++++
> .../compiler/layout-subroutine-location-function.vert | 14 ++++++++++++++
> .../compiler/layout-subroutine-location.vert | 15 +++++++++++++++
> 3 files changed, 44 insertions(+)
> create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
> create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
> create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert
>
> diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
> new file mode 100644
> index 0000000..36a27b3
> --- /dev/null
> +++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
> @@ -0,0 +1,15 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location GL_ARB_explicit_attrib_location
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_shader_subroutine: require
> +#extension GL_ARB_explicit_uniform_location: require
> +#extension GL_ARB_explicit_attrib_location: require
> +
> +subroutine void func_type();
> +
> +/* A subroutine uniform for the above type */
> +layout(index = 2) subroutine uniform func_type f;
> diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
> new file mode 100644
> index 0000000..c63f3c5
> --- /dev/null
> +++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
> @@ -0,0 +1,14 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_shader_subroutine: require
> +#extension GL_ARB_explicit_uniform_location: require
> +
> +subroutine void func_type();
> +
> +/* A subroutine matching the above type */
> +layout(location = 2) subroutine (func_type) void f() {}
> diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert
> new file mode 100644
> index 0000000..47b6700
> --- /dev/null
> +++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert
> @@ -0,0 +1,15 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.50
> +// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location GL_ARB_explicit_attrib_location
> +// [end config]
> +
> +#version 150
> +#extension GL_ARB_shader_subroutine: require
> +#extension GL_ARB_explicit_uniform_location: require
> +#extension GL_ARB_explicit_attrib_location: require
> +
> +subroutine void func_type();
> +
> +/* A subroutine uniform for the above type */
> +layout(location = 2) subroutine uniform func_type f;
>
More information about the Piglit
mailing list