---
 tests/all.tests                                |    2 +-
 tests/shaders/glsl-tests/nested-loops-frag.ini |   44 ++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletions(-)
 create mode 100644 tests/shaders/glsl-tests/nested-loops-frag.ini

diff --git a/tests/all.tests b/tests/all.tests
index b05dec9..dedf55e 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -187,7 +187,7 @@ shaders['vpfp-generic'] = vpfpgeneric
 glslshaderloader = Group()
 def add_glslshaderloader(name):
        glslshaderloader[name] = PlainExecTest(['glsl-shader-loader', '-auto', 
testBinDir + '../tests/shaders/glsl-tests/' + name + '.ini'])
-
+add_glslshaderloader('nested-loops-frag')
 shaders['glsl-shader-loader'] = glslshaderloader
 
 bugs = Group()
diff --git a/tests/shaders/glsl-tests/nested-loops-frag.ini 
b/tests/shaders/glsl-tests/nested-loops-frag.ini
new file mode 100644
index 0000000..4edeb3c
--- /dev/null
+++ b/tests/shaders/glsl-tests/nested-loops-frag.ini
@@ -0,0 +1,44 @@
+[requirements]
+version 2.0
+[test]
+expected 0.0 1.0 0.0 0.25 0.25
+uniform float tex2d 0.0
+[vertex]
+varying vec2 texCoords;
+void main()
+{
+gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+texCoords = gl_MultiTexCoord0.xy;
+}
+[fragment]
+uniform sampler2D tex2d;
+varying vec2 texCoords;
+void main()
+{
+       int i=0;
+       int j=0;
+       vec4 colorOffset= vec4(0,0,0,0);
+       for(i;i<20;++i)
+       {
+               while(j<20)
+               {
+                       ++j;
+                       if(j<15)
+                               continue;
+                       if(j>=15)
+                               break;
+                       colorOffset = vec4(0.0,0.0,1.0,1.0);
+               }
+               if(j>10)
+               {
+                       j=0;
+                       continue;
+               }
+               colorOffset = vec4(1.0,0.0,1.0,1.0);
+       }
+
+       if(i<18)
+               colorOffset = vec4(1.0,0.0,0.0,1.0);
+
+       gl_FragColor = texture2D(tex2d,texCoords)+colorOffset;
+}
-- 
1.6.5.2


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to