2013-01-10 18:20:47 +00:00
|
|
|
#version 140
|
|
|
|
|
2013-01-10 01:47:54 +00:00
|
|
|
varying vec4 v;
|
2013-01-10 18:20:47 +00:00
|
|
|
|
2013-01-10 01:47:54 +00:00
|
|
|
in vec4 i;
|
|
|
|
out vec4 o;
|
2013-01-10 18:20:47 +00:00
|
|
|
|
2013-10-16 22:28:35 +00:00
|
|
|
in float gl_ClipDistance[5];
|
|
|
|
|
2013-01-10 18:20:47 +00:00
|
|
|
void main()
|
|
|
|
{
|
2013-10-16 22:28:35 +00:00
|
|
|
float clip = gl_ClipDistance[2];
|
2013-01-10 18:20:47 +00:00
|
|
|
}
|
2013-04-11 16:31:09 +00:00
|
|
|
#ifdef GL_ES
|
|
|
|
#error GL_ES is set
|
|
|
|
#else
|
|
|
|
#error GL_ES is not set
|
|
|
|
#endif
|
2013-12-04 20:41:33 +00:00
|
|
|
|
|
|
|
in struct S { float f; } s; // ERROR
|
2013-12-18 18:47:12 +00:00
|
|
|
|
2014-02-12 05:15:49 +00:00
|
|
|
float patch = 3.1;
|
|
|
|
|
|
|
|
layout(location=3) in vec4 vl; // ERROR
|
|
|
|
|
2014-07-29 19:31:13 +00:00
|
|
|
layout(location = 3) out vec4 factorBad; // ERROR
|
|
|
|
|
|
|
|
#extension GL_ARB_explicit_attrib_location : enable
|
|
|
|
|
|
|
|
layout(location = 5) out vec4 factor;
|
|
|
|
|
2014-02-12 05:15:49 +00:00
|
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
|
|
|
|
|
|
layout(location=4) in vec4 vl2;
|
2014-03-26 03:17:31 +00:00
|
|
|
|
2015-04-30 03:22:41 +00:00
|
|
|
float fooi();
|
|
|
|
|
2014-03-26 03:17:31 +00: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 03:22:41 +00: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 03:17:31 +00:00
|
|
|
}
|