cb74034517
Add some static typing where possible so that tools like mypy can be used to avoid any future code errors. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32637>