The patch is already backported in the 18.0 branch: https://cgit.freedesktop.org/mesa/mesa/log/?h=18.0