summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-08-11 15:43:40 -0600
committerBrian Paul <brianp@vmware.com>2010-08-11 15:43:40 -0600
commit4a01a0f7f95aff97120285c9a45cfd2c76e828de (patch)
tree383631c5d7469778c265370bc3f6b31326908572
parent5cb69a827e6cd78055427b1c728b90efe2ee1e82 (diff)
glsl1: added function prototype test
-rw-r--r--src/glean/tglsl1.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp
index 3e57334..b4ec9fc 100644
--- a/src/glean/tglsl1.cpp
+++ b/src/glean/tglsl1.cpp
@@ -2609,6 +2609,27 @@ static const ShaderProgram Programs[] = {
},
{
+ "function prototype",
+ NO_VERTEX_SHADER,
+ "float Half(const in float x); \n"
+ "\n"
+ "void main() { \n"
+ " float a = 0.5; \n"
+ " float b = Half(a); \n"
+ " gl_FragColor = vec4(b); \n"
+ "} \n"
+ "\n"
+ "float Half(const in float x) { \n"
+ " return 0.5 * x; \n"
+ "} \n"
+ "\n",
+ { 0.25, 0.25, 0.25, 0.25 },
+ DONT_CARE_Z,
+ FLAG_NONE
+ },
+
+
+ {
"TPPStreamCompiler::assignOperands",
NO_VERTEX_SHADER,
"struct S { \n"