(cherry picked from commit a680481532) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4413>
a680481532
(cherry picked from commit b04ae1f964) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4413>
b04ae1f964