fix ATI crash in GeometryBuffer (unverified)
fix #4116 (caused by #4110)
fix #4117