From: Ian Romanick <[email protected]> Make sure that the correct error is generated. The second 1.30 version and the 1.40 of the test ensure that layout() exists at all by using a different extension (or GLSL version).
Signed-off-by: Ian Romanick <[email protected]> --- .../1.30/compiler/not-enabled-01.vert | 15 +++++++++++++++ .../1.30/compiler/not-enabled-02.vert | 17 +++++++++++++++++ .../1.40/compiler/not-enabled.frag | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert create mode 100644 tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-02.vert create mode 100644 tests/spec/arb_explicit_attrib_location/1.40/compiler/not-enabled.frag diff --git a/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert b/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert new file mode 100644 index 0000000..4395300 --- /dev/null +++ b/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-01.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: fail +// glsl_version: 1.30 +// [end config] +// +// Try to use layout(location) without enabling the extension. + +#version 130 + +layout(location = 0) in vec4 vertex; + +void main() +{ + gl_Position = vertex; +} diff --git a/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-02.vert b/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-02.vert new file mode 100644 index 0000000..186d927 --- /dev/null +++ b/tests/spec/arb_explicit_attrib_location/1.30/compiler/not-enabled-02.vert @@ -0,0 +1,17 @@ +// [config] +// expect_result: fail +// glsl_version: 1.30 +// require_extensions: GL_ARB_shading_language_420pack +// [end config] +// +// Try to use layout(location) without enabling the extension. + +#version 130 +#extension GL_ARB_shading_language_420pack: enable + +layout(location = 0) in vec4 vertex; + +void main() +{ + gl_Position = vertex; +} diff --git a/tests/spec/arb_explicit_attrib_location/1.40/compiler/not-enabled.frag b/tests/spec/arb_explicit_attrib_location/1.40/compiler/not-enabled.frag new file mode 100644 index 0000000..089ea61 --- /dev/null +++ b/tests/spec/arb_explicit_attrib_location/1.40/compiler/not-enabled.frag @@ -0,0 +1,16 @@ +// [config] +// expect_result: fail +// gl_version: 3.1 +// glsl_version: 1.40 +// [end config] +// +// Try to use layout(location) without enabling the extension. + +#version 140 + +layout(location = 0) out vec4 c; + +void main() +{ + c = vec4(0); +} -- 1.8.1.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
