aco: Store tess factors in VMEM only at the end of the shader.
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 6 Mar 2020 19:24:55 +0000 (21:24 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 08:34:11 +0000 (08:34 +0000)
commit4dcca269455adb1029334cefb035fd19d9d99d50
treefc7efcfb13f7df77eeced49714949a7af56e79f9
parent8c3ab49c6b48299935751009c4109a4d2a3b8912
aco: Store tess factors in VMEM only at the end of the shader.

This optimizes out several superfluous stores of the tess factors,
especially if the shader wrote those outputs multiple times.

Pipeline DB changes on GFX10:
Totals from affected shaders:
SGPRS: 30384 -> 29536 (-2.79 %)
Code Size: 2260720 -> 2214484 (-2.05 %) bytes

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3964>
src/amd/compiler/aco_instruction_selection.cpp