diff options
author | cheyang <cheyang@bytedance.com> | 2020-12-22 21:27:38 +0800 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-01-28 14:07:23 +0000 |
commit | 83173d9536c9f5e1571efe5933d210466ec255b8 (patch) | |
tree | 4f7e42512b3399359dde2c4960ec8d1788663f63 | |
parent | bda78247abeb2352bf201194c8805d33d8ba928c (diff) |
EXT_separate_shader_objects: add redeclare built-in variable test
Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/438>
-rw-r--r-- | tests/spec/ext_separate_shader_objects/compiler/3.00/redeclare_built-in_variable.vert | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/spec/ext_separate_shader_objects/compiler/3.00/redeclare_built-in_variable.vert b/tests/spec/ext_separate_shader_objects/compiler/3.00/redeclare_built-in_variable.vert new file mode 100644 index 000000000..597d4a9fe --- /dev/null +++ b/tests/spec/ext_separate_shader_objects/compiler/3.00/redeclare_built-in_variable.vert @@ -0,0 +1,31 @@ +// [config] +// expect_result: pass +// glsl_version: 3.00 +// require_extensions: EXT_separate_shader_objects +// [end config] +// +// From the EXT_separate_shader_objects: +// +// "The following vertex shader outputs may be redeclared +// at global scope to specify a built-in output interface, +// with or without special qualifiers: +// +// gl_Position +// gl_PointSize +// +// When compiling shaders using either of the above variables, +// both such variables must be redeclared prior to use." + +#version 300 es +#extension GL_EXT_separate_shader_objects : require +layout (location = 0) in vec3 aPos; +out highp vec4 gl_Position; +out highp float gl_PointSize; +out vec4 vertexColor; + +void main() +{ + gl_Position = vec4(aPos, 1.0); + gl_PointSize = gl_Position.x; + vertexColor = vec4(0.5, 0.0, 0.0, 1.0); +} |