[Piglit] [PATCH 00/17] Remove dependency on libGLU

Ian Romanick idr at freedesktop.org
Tue Sep 22 10:00:42 PDT 2015


On 09/22/2015 09:54 AM, Matt Turner wrote:
> On Tue, Sep 22, 2015 at 8:36 AM, Ian Romanick <idr at freedesktop.org> wrote:
>> I went to build piglit on a fresh Fedora 22 install yesterday, and the
>> build stopped when libGLU could not be found.  I thought, "Why is piglit
>> linking with libGLU?!?"  For the most part, it's linking with libGLU
>> because it can.  Patch 1 fixes that.
>>
>> There are six places in piglit that actually use functions from GLU.
>> The remainder of the series removes these uses.
>>
>> - polygon-offset uses gluProject.  After a bit of cleaning in patches 2
>>   through 6, patch 7 replaces gluProject with an inline version.  Patch
>>   8 contains code that was used to verify my implementation of
>>   gluProject.  This will *not* be pushed.
>>
>> - Several places in clean used gluErrorString.  These were replaced in
>>   patch 9 with piglit_get_gl_error_name.
>>
>> - Patch 10 replaces a call to gluOrtho2D with glOrtho.  Given that
>>   gluOrtho2D just adds two constant parameters "for you," I'm not sure
>>   why this function ever existed in GLU.
>>
>> - Patch 11 removes an unused method that called gluBuild2DMipmaps.
>>
>> - Patch 12 replaces another call to gluBuild2DMipmaps with
>>   glTexImage2D.  The filters on the texture were configured such that
>>   the other mipmaps were not necessary.
>>
>> - fbo-depth-sample-compare uses gluSphere to generate a sphere model.
>>   After a bit of cleaning in patches 14 and 15, patch 16 adds a simple
>>   sphere tessellator to replace it.
>>
>> With these changes, I was able to build piglit on a Fedora 22 system
>> that did not have the mesa-libGLU-devel package installed.
> 
> Nice!
> 
> I did a quick review and didn't spot any problems. The series, except
> for patch 16 which I'll trust you on, is
> 
> Reviewed-by: Matt Turner <mattst88 at gmail.com>

Thanks. :)

> Patch 16 is
> 
> Acked-by: Matt Turner <mattst88 at gmail.com>

The before and after images are the same, at least.  I did have to
change the number of stacks from 20 to 40 to get the same apparently
level of tessellation as the GLU version... and I just realized what the
problem is.  I'm doing N slices from 0 to 2pi instead of N slices from 0
to pi.



More information about the Piglit mailing list