]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/expression_inline_iteration.glsl
Fix GLSL test cases so they pass the basic tests
[libs/gl.git] / tests / glsl / expression_inline_iteration.glsl
index 20136ca40ef66e003f0dedca4a9efa76872fac35..9f12880f0ba646c14a843cc295ea2463a793d8d5 100644 (file)
@@ -3,33 +3,35 @@ layout(location=0) in vec4 position;
 layout(location=1) in vec3 direction;
 void main()
 {
-       vec4 p = position.xyz;
+       vec3 p = position.xyz;
        int step = -1;
        for(int i=0; i<10; ++i)
        {
                float scale = 2.0;
                p += direction*scale;
-               if(p.z<0)
+               if(p.z<0.0)
                        break;
                step = i;
        }
        gl_Position = position+vec4(step, 0.0, 0.0, 0.0);
 }
 
+// Target API: Vulkan
+
 /* Expected output: vertex
 layout(location=0) in vec4 position;
 layout(location=1) in vec3 direction;
 void main()
 {
-       vec4 p = position.xyz;
+       vec3 p = position.xyz;
        int step = -1;
        for(int i=0; i<10; ++i)
        {
                p += direction*2.0;
-               if(p.z<0)
+               if(p.z<0.0)
                        break;
                step = i;
        }
-       gl_Position = position+vec4(step, 0.0, 0.0, 0.0);
+       gl_Position = position+vec4(float(step), 0.0, 0.0, 0.0);
 }
 */