diff options
author | Vadym Shovkoplias <vadim.shovkoplias@gmail.com> | 2018-08-27 15:19:40 +0300 |
---|---|---|
committer | Timothy Arceri <tarceri@itsqueeze.com> | 2018-08-29 20:08:01 +1000 |
commit | c98669cbd1f801c8fda25aceab23b5c54de76b9e (patch) | |
tree | 219087fa08263d8e88dfa83027f32c495daf0156 | |
parent | 91e800a30750f5d50469c5048e77613bed5395e0 (diff) |
glsl-1.30: add linker test for inter stage in/out vars usage
This test exposes a Mesa GLSL linker bug. The test fails with the
following error message:
error: fragment shader input `foo' has no matching output in the previous
stage
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731
-rw-r--r-- | tests/spec/glsl-1.30/linker/interstage-multiple-vertex-objects.shader_test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/linker/interstage-multiple-vertex-objects.shader_test b/tests/spec/glsl-1.30/linker/interstage-multiple-vertex-objects.shader_test new file mode 100644 index 000000000..dd168d434 --- /dev/null +++ b/tests/spec/glsl-1.30/linker/interstage-multiple-vertex-objects.shader_test @@ -0,0 +1,33 @@ +# Exercises a Mesa GLSL linker bug. +# +# Output "foo" variable is not used in the "main" vertex shader +# but used in fragment shader + +[require] +GLSL >= 1.30 + +[vertex shader] +out vec4 foo; +void unused() +{ + foo=vec4(1); +} + +[vertex shader] +in vec4 pos; +void main() +{ + gl_Position = pos; +} + +[fragment shader] +in vec4 foo; +out vec4 color; + +void main() +{ + gl_FragColor=foo; +} + +[test] +link success |