On 25 August 2012 01:12, Chris Forbes <span dir="ltr"><<a href="mailto:chrisf@ijw.co.nz" target="_blank">chrisf@ijw.co.nz</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
fp-kil assumed that `1` was an unused texture name. This isn't<br>
true if running with -fbo, so use glGenTextures to get a name<br>
that's really unused.<br>
<br>
Signed-off-by: Chris Forbes <<a href="mailto:chrisf@ijw.co.nz">chrisf@ijw.co.nz</a>><br>
---<br>
tests/shaders/fp-kil.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/tests/shaders/fp-kil.c b/tests/shaders/fp-kil.c<br>
index 3f35452..d9b78fe 100644<br>
--- a/tests/shaders/fp-kil.c<br>
+++ b/tests/shaders/fp-kil.c<br>
@@ -113,7 +113,7 @@ static const struct {<br>
{ 0.0, 0.0, 0.0, 1.0 }<br>
},<br>
<br>
- // Program 0<br>
+ // Program 1<br></blockquote><div><br>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").<br>
<br>In any case, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>>.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
{<br>
"texture #1",<br>
0.125, 1.125,<br>
@@ -264,6 +264,7 @@ void<br>
piglit_init(int argc, char **argv)<br>
{<br>
int i, x, y;<br>
+ int texname;<br>
GLubyte tex[4][4][4];<br>
<br>
if (piglit_get_gl_version() < 13) {<br>
@@ -293,9 +294,10 @@ piglit_init(int argc, char **argv)<br>
}<br>
}<br>
<br>
+ glGenTextures(1, &texname);<br>
glActiveTexture(GL_TEXTURE0);<br>
glEnable(GL_TEXTURE_2D);<br>
- glBindTexture(GL_TEXTURE_2D, 1);<br>
+ glBindTexture(GL_TEXTURE_2D, texname);<br>
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 4, 4, 0,<br>
GL_RGBA, GL_UNSIGNED_BYTE, tex);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.7.12<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br>