On 9 December 2013 18:42, Anuj Phogat <[email protected]> wrote: > > > > On Mon, Dec 9, 2013 at 10:02 AM, Paul Berry <[email protected]>wrote: > >> On 6 November 2013 17:24, Anuj Phogat <[email protected]> wrote: >> >>> + static const char *frag_template = >>> + "#version 130\n" >>> + "%s\n" >>> + "uniform %s tex;\n" >>> + "uniform int samples;\n" >>> + "out vec4 out_color;\n" >>> + "void main()\n" >>> + "{\n" >>> + " int i = 0;\n" >>> + " bool pass = true;\n" >>> + " int mask = (int(gl_FragCoord.x) * 0x10204081) ^\n" >>> + " (int(gl_FragCoord.y) * 0x01010101);\n" >>> + " vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n" >>> + " vec4 black = vec4(0.0, 0.0, 0.0, 0.0);\n" >>> + " do {\n" >>> >> >> Any particular reason not to use a for loop here? (i.e. for (int i = 0; >> i < samples; i++)) >> > > I used do-while to include testing of 'samples == 0' case. >
Oh, ok. Would you mind putting a comment just above the loop to explain that? With the comment added I'm ok with the loop as is.
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
