[Piglit] [PATCH] util: do not compile/attach a NULL shader

Anuj Phogat anuj.phogat at gmail.com
Thu Mar 19 13:55:20 PDT 2015


On Wed, Mar 18, 2015 at 12:17 AM, Martin Peres
<martin.peres at linux.intel.com> wrote:
> Bump. I would like to push this patch this week.
>
>
> On 05/03/15 10:56, Martin Peres wrote:
>>
>> This will simplify greatly the code for an upcoming test
>>
>> Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
>> ---
>>   tests/util/piglit-shader.c | 10 +++++++---
>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>   mode change 100644 => 100755 tests/util/piglit-shader.c
>>
>> diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
>> old mode 100644
>> new mode 100755
>> index 37cc7cc..dfc2d92
>> --- a/tests/util/piglit-shader.c
>> +++ b/tests/util/piglit-shader.c
>> @@ -378,10 +378,14 @@
>> piglit_build_simple_program_unlinked_multiple_shaders_v(GLenum target1,
>>         target = target1;
>>         while (target != 0) {
>> -               GLuint shader = piglit_compile_shader_text(target,
>> source);
>> +               /* do not compile/attach a NULL shader */
>> +               if (source) {
>> +                       GLuint shader = piglit_compile_shader_text(target,
>> +
>> source);
>>   -             glAttachShader(prog, shader);
>> -               glDeleteShader(shader);
>> +                       glAttachShader(prog, shader);
>> +                       glDeleteShader(shader);
>> +               }
>>                 target  = va_arg(ap, GLenum);
>>                 if (target != 0)
>
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list