panfrost: Precompute scoreboard dependents
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 12 Jul 2019 21:48:34 +0000 (14:48 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 12 Jul 2019 23:22:15 +0000 (16:22 -0700)
commite173d6b1b13b24860d5948c386f629aaaf53f862
treea3ac03e72755a1db94bfa574a2b842cd3e0f637e
parentb68778e6de2da1921cf1c19cff8f54cff46eb37d
panfrost: Precompute scoreboard dependents

Mali job dependency graphs, at least for GLES3.0, have the special
property that a given node will only have at most a single dependent.
This allows us to efficiently precompute the dependent array and
replace an inner loop's O(N) search with an O(1) lookup, bringing the
algorithmic complexity of scoreboarding from O(N^2) to O(N).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_scoreboard.c