summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glean/tglsl1.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp
index ffd9280..1e6b04e 100644
--- a/src/glean/tglsl1.cpp
+++ b/src/glean/tglsl1.cpp
@@ -3001,6 +3001,70 @@ static const ShaderProgram Programs[] = {
},
{
+ "Preprocessor test (8)",
+ NO_VERTEX_SHADER,
+ "#define FOO \n"
+ "void main() { \n"
+ "#ifdef FOO \n"
+ " gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
+ "#else \n"
+ " gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
+ "#endif \n"
+ "} \n",
+ { 0.0, 1.0, 0.0, 0.0 },
+ DONT_CARE_Z,
+ FLAG_NONE
+ },
+
+ {
+ "Preprocessor test (9)",
+ NO_VERTEX_SHADER,
+ "#define FOO \n"
+ "void main() { \n"
+ "#ifndef FOO \n"
+ " gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
+ "#else \n"
+ " gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
+ "#endif \n"
+ "} \n",
+ { 1.0, 0.0, 0.0, 0.0 },
+ DONT_CARE_Z,
+ FLAG_NONE
+ },
+
+ {
+ "Preprocessor test (10)",
+ NO_VERTEX_SHADER,
+ "#define FOO \n"
+ "void main() { \n"
+ "#if defined(FOO) \n"
+ " gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
+ "#else \n"
+ " gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
+ "#endif \n"
+ "} \n",
+ { 0.0, 1.0, 0.0, 0.0 },
+ DONT_CARE_Z,
+ FLAG_NONE
+ },
+
+ {
+ "Preprocessor test (11)",
+ NO_VERTEX_SHADER,
+ "#define FOO \n"
+ "void main() { \n"
+ "#if !defined(FOO) \n"
+ " gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
+ "#else \n"
+ " gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
+ "#endif \n"
+ "} \n",
+ { 1.0, 0.0, 0.0, 0.0 },
+ DONT_CARE_Z,
+ FLAG_NONE
+ },
+
+ {
"Comment test (1)",
NO_VERTEX_SHADER,
"/* this is\n"