[Piglit] [PATCH 12/12] msaa: Add depth buffer testing to sample-alpha-to-coverage test case

Anuj Phogat anuj.phogat at gmail.com
Tue Jul 17 15:23:31 PDT 2012


[snip]
>>
>> @@ -58,9 +64,9 @@ void
>>  piglit_init(int argc, char **argv)
>>  {
>>         int samples;
>> -       int num_attachments = 1;
>> -
>> -       if (argc < 2)
>> +       int num_attachments;
>> +       piglit_require_gl_version(30);
>> +       if (argc < 3)
>>                 print_usage_and_exit(argv[0]);
>>         {
>>                 char *endptr = NULL;
>> @@ -68,8 +74,16 @@ piglit_init(int argc, char **argv)
>>                 if (endptr != argv[1] + strlen(argv[1]))
>>                         print_usage_and_exit(argv[0]);
>>         }
>> -
>> -       piglit_require_gl_version(30);
>> +       if (strcmp(argv[2], "color") == 0) {
>> +               buffer_to_test = GL_COLOR_BUFFER_BIT;
>> +               num_attachments = 3;
>> +       } else if (strcmp(argv[2], "depth") == 0) {
>> +               buffer_to_test = GL_DEPTH_BUFFER_BIT;
>> +               num_attachments = 1;
>> +               glEnable(GL_DEPTH_TEST);
>> +               glDepthFunc(GL_ALWAYS);
>> +       } else
>> +               print_usage_and_exit(argv[0]);
>
>
> I'm confused.  Before this patch, it looks like the test only tested color
> buffers and always used num_attachments = 1.  After this patch, it uses
> num_attachments = 3 when testing color and num_attachments = 1 when testing
> depth.
>
> Don't we want to use num_attachments = 1 in both cases for this test?
>
Yeah, I confused this with the case of multiple draw buffers. I'll fix
it before pushing.

> Other than that this patch is:
>
> Reviewed-by: Paul Berry <stereotype441 at gmail.com>
>


More information about the Piglit mailing list