[Piglit] [PATCH v2 2/2] framebuffer-blit-levels: Test stencil buffers.
Eric Anholt
eric at anholt.net
Thu Oct 4 13:00:39 PDT 2012
Paul Berry <stereotype441 at gmail.com> writes:
> On 1 October 2012 14:49, Eric Anholt <eric at anholt.net> wrote:
>> Paul Berry <stereotype441 at gmail.com> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121004/542d655b/attachment.pgp>
More information about the Piglit
mailing list