2013-01-10 22:20:47 +04:00
|
|
|
#version 140
|
|
|
|
|
2013-01-10 05:47:54 +04:00
|
|
|
varying vec4 v;
|
2013-01-10 22:20:47 +04:00
|
|
|
|
2013-01-10 05:47:54 +04:00
|
|
|
in vec4 i;
|
|
|
|
out vec4 o;
|
2013-01-10 22:20:47 +04:00
|
|
|
|
2013-10-17 02:28:35 +04:00
|
|
|
in float gl_ClipDistance[5];
|
|
|
|
|
2013-01-10 22:20:47 +04:00
|
|
|
void main()
|
|
|
|
{
|
2013-10-17 02:28:35 +04:00
|
|
|
float clip = gl_ClipDistance[2];
|
2013-01-10 22:20:47 +04:00
|
|
|
}
|
2013-04-11 20:31:09 +04:00
|
|
|
#ifdef GL_ES
|
|
|
|
#error GL_ES is set
|
|
|
|
#else
|
|
|
|
#error GL_ES is not set
|
|
|
|
#endif
|
2013-12-05 00:41:33 +04:00
|
|
|
|
|
|
|
in struct S { float f; } s; // ERROR
|
2013-12-18 22:47:12 +04:00
|
|
|
|
2014-02-12 09:15:49 +04:00
|
|
|
float patch = 3.1;
|
|
|
|
|
|
|
|
layout(location=3) in vec4 vl; // ERROR
|
|
|
|
|
2014-07-29 23:31:13 +04:00
|
|
|
layout(location = 3) out vec4 factorBad; // ERROR
|
|
|
|
|
|
|
|
#extension GL_ARB_explicit_attrib_location : enable
|
|
|
|
|
|
|
|
layout(location = 5) out vec4 factor;
|
|
|
|
|
2014-02-12 09:15:49 +04:00
|
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
|
|
|
|
|
|
layout(location=4) in vec4 vl2;
|
2014-03-26 07:17:31 +04:00
|
|
|
|
2015-04-30 06:22:41 +03:00
|
|
|
float fooi();
|
|
|
|
|
2014-03-26 07:17:31 +04:00
|
|
|
void foo()
|
|
|
|
{
|
|
|
|
vec2 r1 = modf(v.xy, v.zw); // ERROR, v.zw not l-value
|
|
|
|
vec2 r2 = modf(o.xy, o.zw);
|
2015-04-30 06:22:41 +03:00
|
|
|
o.z = fooi();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Test extra-function initializers
|
|
|
|
|
|
|
|
float i1 = gl_FrontFacing ? -2.0 : 2.0;
|
|
|
|
float i2 = 102;
|
|
|
|
|
|
|
|
float fooi()
|
|
|
|
{
|
|
|
|
return i1 + i2;
|
2014-03-26 07:17:31 +04:00
|
|
|
}
|