Commit b68c885b authored by Neil Roberts's avatar Neil Roberts

glsl-es-1.00: Test that mismatched function return precision fails

In GLSL ES functions can have precision qualifers for the return type.
Interpreting this quote from the GLSL ES spec, it seems like the
precision for the return type should match between repeated
declarations of the same function:

“Only a precision qualifier is allowed on the return type of a
 function. […] If a function name is declared twice with the same
 parameter types, then the return types and all qualifiers must also
 match, and it is the same function being declared.”
Reviewed-by: Timothy Arceri's avatarTimothy Arceri <>
parent e16deab3
// [config]
// expect_result: fail
// glsl_version: 1.00
// [end config]
#version 100
precision mediump float;
/* The prototype uses the default (mediump) precision for the return type. */
/* The definition use an explicit highp precision. */
highp float
return 3.0;
gl_FragColor = vec4(get_three());
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment