On 25 August 2012 01:12, Chris Forbes <[email protected]> wrote:

> fp-kil assumed that `1` was an unused texture name. This isn't
> true if running with -fbo, so use glGenTextures to get a name
> that's really unused.
>
> Signed-off-by: Chris Forbes <[email protected]>
> ---
>  tests/shaders/fp-kil.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/shaders/fp-kil.c b/tests/shaders/fp-kil.c
> index 3f35452..d9b78fe 100644
> --- a/tests/shaders/fp-kil.c
> +++ b/tests/shaders/fp-kil.c
> @@ -113,7 +113,7 @@ static const struct {
>                 { 0.0, 0.0, 0.0, 1.0 }
>         },
>
> -       // Program 0
> +       // Program 1
>

I don't mixing an unrelated comment fix into the patch, especially since
the fix is so obviously correct.  But it would be nice to briefly mention
it in the commit message just to avoid jarring people (e.g. "also fixed a
bogus comment").

In any case, this patch is:

Reviewed-by: Paul Berry <[email protected]>.


>         {
>                 "texture #1",
>                 0.125, 1.125,
> @@ -264,6 +264,7 @@ void
>  piglit_init(int argc, char **argv)
>  {
>         int i, x, y;
> +       int texname;
>         GLubyte tex[4][4][4];
>
>         if (piglit_get_gl_version() < 13) {
> @@ -293,9 +294,10 @@ piglit_init(int argc, char **argv)
>                 }
>         }
>
> +       glGenTextures(1, &texname);
>         glActiveTexture(GL_TEXTURE0);
>         glEnable(GL_TEXTURE_2D);
> -       glBindTexture(GL_TEXTURE_2D, 1);
> +       glBindTexture(GL_TEXTURE_2D, texname);
>         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 4, 4, 0,
>                      GL_RGBA, GL_UNSIGNED_BYTE, tex);
>
> --
> 1.7.12
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to