diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-24 10:35:52 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-24 10:35:52 -0600 |
commit | 9417e9534006dd5d94dcf619e599f6315c23da66 (patch) | |
tree | 103bb1cf5795f98384e687a3b45edfe3246e6b53 | |
parent | e2fc95cd7bca5801e5702c0854c342490a0d499f (diff) |
glsl1: added deeply if-nested return test
-rw-r--r-- | src/glean/tglsl1.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index cbf8c89..79ac78e 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -2272,6 +2272,27 @@ static const ShaderProgram Programs[] = { }, { + "function with early return (4)", + NO_VERTEX_SHADER, + "float val = 0.5; \n" + "void sub(in float x) { \n" + " if (x >= 0.3) \n" + " if (x >= 0.4) \n" + " return; \n" + " val = 1.0; \n" + "} \n" + "\n" + "void main() { \n" + " sub(gl_TexCoord[0].s); \n" + " gl_FragColor = vec4(val); \n" + "} \n", + { 0.5, 0.5, 0.5, 0.5 }, + DONT_CARE_Z, + FLAG_NONE + }, + + + { "nested function calls (1)", NO_VERTEX_SHADER, "float Half(const in float x) { \n" |