763744aa8b
The range helper is taken from ANV; the gpu_ptr one is original. This also fixes a few more bugs where we weren't adding offsets in properly. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16216>