radeonsi: optimize out the loop in si_get_ps_input_cntl
authorMarek Olšák <marek.olsak@amd.com>
Sat, 15 Aug 2020 08:39:30 +0000 (04:39 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 3 Sep 2020 03:03:00 +0000 (23:03 -0400)
commit98e866c66953875a170cfff79a3c2f3c79460ed2
tree2acc7b30d54137ae08ebd9c580ee2b2cd4942f9b
parent6ecb8b689976d21868e56a4f59f1354ea256d23d
radeonsi: optimize out the loop in si_get_ps_input_cntl

Use a remap table from a semantic to an index instead of searching
for the correct index.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340>
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/radeonsi/si_state_shaders.c