diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-10 08:09:36 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-10 16:13:42 -0700 |
commit | 27cb20f9957d23666baf93eddfcb2b32e6435d9f (patch) | |
tree | 343b154c8b345320e2e8c08de21daeac9af11a13 | |
parent | 98b8e251649ad7e7b0aa5a94b0d6e5e4cc6cfc5d (diff) |
glsl1: additional GLSL preprocessor tests
-rw-r--r-- | src/glean/tglsl1.cpp | 64 |
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" |