Cleaner patch already in mailing list: http://lists.freedesktop.org/archives/mesa-dev/2013-August/043882.html