diff options
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/const-initializer/from-function.frag')
-rw-r--r-- | tests/spec/glsl-es-1.00/compiler/const-initializer/from-function.frag | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/const-initializer/from-function.frag b/tests/spec/glsl-es-1.00/compiler/const-initializer/from-function.frag new file mode 100644 index 000000000..fe0268c22 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/const-initializer/from-function.frag @@ -0,0 +1,25 @@ +#version 100 + +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * Section 5.10 (Constant Expressions) of the GLSL ES 1.00.17 spec says: + * + * "A constant expression is one of + * + * ... + * + * - a built-in function call whose arguments are all constant + * expressions, with the exception of the texture lookup functions." + */ + +precision mediump float; + +const float f = cos(0.0); + +void main() +{ + gl_FragData[0] = vec4(f); +} |