iris: Use a tiny table to map mmap modes to offsets
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 14 Jul 2021 18:17:03 +0000 (13:17 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 12 Aug 2021 19:29:59 +0000 (19:29 +0000)
commit24031700a7f6f38826d3a2ff4c5aa4b7c773c919
treeae0a600ce8c19659f27c82e6eed472fecb5c2a7b
parentc49041c9d7a923fc0306f5b0c313f62706dcb12a
iris: Use a tiny table to map mmap modes to offsets

This is a little more obvious than the if-ladder.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
src/gallium/drivers/iris/iris_bufmgr.c