This is the commit where this problems starts: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab07ae05a3dccef620c716e821c647413b951051