diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2013-10-01 18:38:44 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-10-14 14:50:27 -0700 |
commit | 31450c71aeddbfc9e8748a31b9aa91819d1ce229 (patch) | |
tree | 4b78a83bd66ab7f548ec06dd06efd96026c4d85e | |
parent | 13fbb8442a479f30436f62b864b8aa40b0d8d374 (diff) |
sso: Add compile tests for the location layout qualifier
NVIDIA (304.64 on GTX 260) fails all of the 1.10, 1.20, and 1.30 tests
because they fail to recognize the layout keyword at all. Paul has
suggested that adding
#extension GL_ARB_fragment_coord_conventions: require
may work around this issue in some cases.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Wen Su <WSu@nvidia.com>
11 files changed, 171 insertions, 0 deletions
diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.frag b/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.frag new file mode 100644 index 000000000..b91faa132 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.frag @@ -0,0 +1,14 @@ +// [config] +// expect_result: pass +// glsl_version: 1.10 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 110 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) in vec4 a; + +void main() +{ + gl_FragColor = a; +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.vert b/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.vert new file mode 100644 index 000000000..ecc8e788b --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.10/layout-location.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.10 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 110 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) out vec4 a; + +void main() +{ + gl_Position = gl_Vertex; + a = vec4(0); +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.frag b/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.frag new file mode 100644 index 000000000..0090a9f57 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.frag @@ -0,0 +1,14 @@ +// [config] +// expect_result: pass +// glsl_version: 1.20 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 120 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) in vec4 a; + +void main() +{ + gl_FragColor = a; +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.vert b/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.vert new file mode 100644 index 000000000..d432b8194 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.20/layout-location.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.20 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 120 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) out vec4 a; + +void main() +{ + gl_Position = gl_Vertex; + a = vec4(0); +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.frag b/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.frag new file mode 100644 index 000000000..a0dde35f6 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.frag @@ -0,0 +1,14 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 130 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) in vec4 a; + +void main() +{ + gl_FragColor = a; +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.vert b/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.vert new file mode 100644 index 000000000..104dc716d --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.30/layout-location.vert @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.30 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 130 +#extension GL_ARB_separate_shader_objects: require + +layout(location = 0) out vec4 a; + +void main() +{ + gl_Position = gl_Vertex; + a = vec4(0); +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.frag b/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.frag new file mode 100644 index 000000000..683892de3 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.frag @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 140 +#extension GL_ARB_separate_shader_objects: require + +out vec4 fragcolor; +layout(location = 0) in vec4 a; + +void main() +{ + fragcolor = a; +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.vert b/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.vert new file mode 100644 index 000000000..8c55c4aeb --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.40/layout-location.vert @@ -0,0 +1,16 @@ +// [config] +// expect_result: pass +// glsl_version: 1.40 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 140 +#extension GL_ARB_separate_shader_objects: require + +in vec4 piglit_vertex; +layout(location = 0) out vec4 a; + +void main() +{ + gl_Position = piglit_vertex; + a = vec4(0); +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.frag b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.frag new file mode 100644 index 000000000..63fafe784 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.frag @@ -0,0 +1,15 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 150 +#extension GL_ARB_separate_shader_objects: require + +out vec4 fragcolor; +layout(location = 0) in vec4 a; + +void main() +{ + fragcolor = a; +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.geom b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.geom new file mode 100644 index 000000000..f34cf2ee2 --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.geom @@ -0,0 +1,22 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 150 +#extension GL_ARB_separate_shader_objects: require + +layout(points) in; +layout(points) out; + +layout(location = 0) in vec4 in_position; + +layout(location = 0) out vec4 position; +layout(location = 1) out vec4 color; + +void main() +{ + position = in_position; + color = vec4(0); + EmitVertex(); +} diff --git a/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.vert b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.vert new file mode 100644 index 000000000..98857185e --- /dev/null +++ b/tests/spec/arb_separate_shader_objects/compiler/1.50/layout-location.vert @@ -0,0 +1,16 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_separate_shader_objects +// [end config] +#version 150 +#extension GL_ARB_separate_shader_objects: require + +in vec4 piglit_vertex; +layout(location = 0) out vec4 a; + +void main() +{ + gl_Position = piglit_vertex; + a = vec4(0); +} |