On Thu, Feb 19, 2015 at 2:11 AM, Matt Turner <[email protected]> wrote: > On Wed, Feb 18, 2015 at 11:06 PM, Ilia Mirkin <[email protected]> wrote: >> On Thu, Feb 19, 2015 at 2:01 AM, Matt Turner <[email protected]> wrote: >>> The code declared GLuint textures[4] and then proceeded to do things >>> like glGenTextures(5, textures) and access textures[4]. Presumably the >>> intention was to declare an array of size 5. >>> --- >>> Vinson pointed out that this test was broken a month ago... >>> >>> tests/fbo/fbo-mrt-new-bind.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/tests/fbo/fbo-mrt-new-bind.c b/tests/fbo/fbo-mrt-new-bind.c >>> index 8e006b5..18c36c5 100644 >>> --- a/tests/fbo/fbo-mrt-new-bind.c >>> +++ b/tests/fbo/fbo-mrt-new-bind.c >>> @@ -46,7 +46,7 @@ PIGLIT_GL_TEST_CONFIG_END >>> GLenum buffers[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }; >>> GLuint fbos[3]; >>> GLint prog0, prog1; >>> -GLuint textures[4]; >>> +GLuint textures[5]; >> >> Yes. >> >>> >>> void >>> piglit_init(int argc, char **argv) >>> @@ -56,7 +56,7 @@ piglit_init(int argc, char **argv) >>> piglit_require_GLSL_version(130); >>> >>> glGenTextures(5, textures); >>> - for (i=0; i<4; i++) { >>> + for (i = 0; i < ARRAY_SIZE(textures); i++) { >> >> No. The code below does >> >> glBindTexture(GL_TEXTURE_2D, textures[4]); >> glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, 640, 360, 0, >> GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL); >> >> The loop is just there to initialize the 4 color textures. > > Oh, you're right. That's what I get for combining fixes with (what I > thought was a) superfluous changes! I'll remove that. > > R-b on the s/4/5/?
Yes if you drop the second hunk, Reviewed-by: Ilia Mirkin <[email protected]> > >>> glBindTexture(GL_TEXTURE_2D, textures[i]); >>> glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 64, 64, 0, GL_RGBA, >>> GL_UNSIGNED_BYTE, NULL); >>> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, >>> GL_NEAREST); >>> -- >>> 2.0.5 >>> >>> _______________________________________________ >>> Piglit mailing list >>> [email protected] >>> http://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
