[Piglit] [PATCH] Test that fragment shader writes to render targets are properly ordered.

Paul Berry stereotype441 at gmail.com
Mon Jul 30 11:00:55 PDT 2012


On 30 July 2012 10:40, Eric Anholt <eric at anholt.net> wrote:

> Paul Berry <stereotype441 at gmail.com> writes:
> > +     "  for (uint i = 2u; i < number_to_classify; ++i) {\n"
> > +     "    if (number_to_classify % i == 0u)\n"
> > +     "      factor_found = true;\n"
> > +     "  }\n"
>
> not breaking out of the loop if you find a factor :)
>

You're right of course, if the goal was to create a fast primality test.
But the goal is to make a shader that can be made very slow or very fast
depending on the size of its input parameter.  Breaking out of the loop
when I found a factor would defeat the purpose :)


>
> > +enum piglit_result
> > +piglit_display(void)
> > +{
> > +     enum piglit_result result = PIGLIT_PASS;
> > +     unsigned size;
>
> needs
>
>         piglit_require_glsl_version(130);
>
> I think.
>

Oh, yeah.  Oops.


>
> > +
> > +     glUseProgram(prog);
> > +     glClear(GL_COLOR_BUFFER_BIT);
>
> Other than the require_version,
>
> Reviewed-by: Eric Anholt <eric at anholt.net>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120730/b003802b/attachment.html>


More information about the Piglit mailing list