pvr: Add PVR_SELECT() helper macro
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Thu, 5 Jan 2023 11:41:26 +0000 (11:41 +0000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 20 Feb 2023 13:34:02 +0000 (13:34 +0000)
commit7386342a19a35ecd3e51abdb0053079ab43a82cf
tree2381b14c786708cc133a69da72abc510ff812041
parentce67f5ac944bdc6ebf27e3b115706bec5b63f002
pvr: Add PVR_SELECT() helper macro

For pvr_setup_descriptor_mappings_new() there will be quite a few
variables of which the value depend on the stage so rather than
having all that selection in the `switch` at the beginning of the
function the helper macro provides a compact selection in the
desired scope.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21331>
src/imagination/vulkan/pvr_cmd_buffer.c