Paul Berry <[email protected]> writes: > On 1 October 2012 14:49, Eric Anholt <[email protected]> wrote: >> Paul Berry <[email protected]> writes: >> > @@ -239,7 +308,13 @@ upload_test_data(GLuint texture, unsigned >> data_level, >> > >> > glBindTexture(GL_TEXTURE_2D, texture); >> > >> > - create_test_data(data, texture_format, data_level, width, height); >> > + if (texture_format == GL_DEPTH_STENCIL) { >> > + create_test_data_depthstencil((GLbyte *) data, data_level, >> > + width, height); >> > + } else { >> > + create_test_data(data, texture_format, data_level, >> > + width, height); >> > + } >> >> But here you avoid calling create_test_data for GL_DEPTH_STENCIL. I >> think you could just adjust the GL_DEPTH_STENCIL case above. >> > > Ok, I agree. But there's a difficulty: with the change you suggest, > create_test_data() will be called by both upload_test_data() (which needs > the data in depth/stencil format) and piglit_display() (which needs just > the stencil data, so it can pass it via test_image() to > piglit_probe_image_stencil()). I'll submit a v2 patch that calls > create_test_data(GL_DEPTH_STENCIL) in the former case and > create_test_data(GL_STENCIL_INDEX) in the latter case. Hopefully that will > make the code easier to follow.
Yeah, I was missing the other caller of create_test_data. Looks good to me.
pgpCFYXY0onIr.pgp
Description: PGP signature
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
