435e7f5e6d
Locations show up in two places: variables and lowered I/O semantics. We want to reuse the logic in both places, so extract it out. The extracted logic is IMO easier to read, too. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21091>