[Piglit] [PATCH] texwrap: test wrapping texture offsets

Dave Airlie airlied at gmail.com
Wed May 27 02:25:25 PDT 2015


>>         case GL_MIRROR_CLAMP_EXT:
>> @@ -862,6 +868,10 @@ static void draw(const struct format_desc *format,
>>                 scale[0] = scale[1] = scale[2] = scale[3] = 1.0/((1ull <<
>> (bits-1))-1);
>>                 glUseProgram(prog_int);
>>                 glUniform4fv(int_scale_loc, 1, scale);
>> +               if (texture_offset)
>> +                       glUniform1f(int_use_offset_loc, 1.0);
>> +               else
>> +                       glUniform1f(int_use_offset_loc, 0.0);
>
>
> Is it legal to set boolean uniforms with a float?  I would expect that
> glUniform1i() would be required here.  In any case, this could boil down to:
>    glUniform1f(int_use_offset_loc, texture_offset);

Yes its legal but Uniform1i with texture_offset is cleaner alright.
I'll fix that up.

and I've fixed up the tabs, can I consider that an R-b?

Thanks,
Dave.


More information about the Piglit mailing list