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

Ian Romanick idr at freedesktop.org
Tue Sep 22 08:36:25 PDT 2015


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.



More information about the Piglit mailing list