panfrost: Inline panfrost_get_default_swizzle
authorIcecream95 <ixn@keemail.me>
Fri, 14 Feb 2020 07:22:38 +0000 (20:22 +1300)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Feb 2020 12:53:36 +0000 (12:53 +0000)
commitf3490a141c8d562fc29e714c3735f2ae8e3c0512
tree00a48949a663868ff23809b2c0e8e275ce27fa87
parentefda2cfcf96b1071c18800ff3f878fe627359e8a
panfrost: Inline panfrost_get_default_swizzle

This commit replaces panfrost_get_default_swizzle with an inlined
implementation where the returned values can be determined at compile
time.

According to perf, this previously used about 2% CPU for Openarena.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3824>
src/gallium/drivers/panfrost/pan_assemble.c
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_format.c
src/gallium/drivers/panfrost/pan_format.h
src/gallium/drivers/panfrost/pan_varyings.c