glsl: Add warning tests for identifiers with __

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Ian Romanick 2018-11-01 13:47:58 -07:00
parent d28bc35ece
commit 011abfc963
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#version 130
float __foo(float x)
{
return 6.0 * x;
}
float __bar(float x)
{
return 3.0 * x;
}
float __blat(float x)
{
return 2.0 * x;
}
void main()
{
gl_Position = vec4(__foo(gl_Vertex.x), __bar(gl_Vertex.y), __blat(gl_Vertex.z), 1.0);
}

View file

@ -0,0 +1,3 @@
0:3(7): warning: identifier `__foo' uses reserved `__' string
0:8(7): warning: identifier `__bar' uses reserved `__' string
0:13(7): warning: identifier `__blat' uses reserved `__' string