diff options
-rw-r--r-- | tests/spec/arb_shader_subroutine/compiler/call-param-match.frag | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/spec/arb_shader_subroutine/compiler/call-param-match.frag b/tests/spec/arb_shader_subroutine/compiler/call-param-match.frag new file mode 100644 index 000000000..a698d615e --- /dev/null +++ b/tests/spec/arb_shader_subroutine/compiler/call-param-match.frag @@ -0,0 +1,29 @@ +// [config] +// expect_result: pass +// glsl_version: 1.50 +// require_extensions: GL_ARB_shader_subroutine +// [end config] + +#version 150 +#extension GL_ARB_shader_subroutine: require + +uniform vec4 u; +out vec4 piglit_fragcolor; +subroutine float func_type(vec4 color); + +subroutine uniform func_type f; + +subroutine(func_type) float R(vec4 p) +{ + return p.r; +} + +subroutine(func_type) float G(vec4 p) +{ + return p.g; +} + +void main() +{ + piglit_fragcolor = vec4(f(u)); +} |