-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ben Holmes wrote:
> ---
> 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
Now I understand why you used glUniformi for the 'float' case. I think
you'll need to either add a 'sampler' case or an 'int' case.
> +[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;
> +}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksVhtYACgkQX1gOwKyEAw9yBwCfbRzEYoKdy3UM+L2qyEY7KOnw
mmEAn2gz37xNxG/CzNVpOn3wa1474U0x
=pLsJ
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev