freedreno: Avoid duplicate BO relocs in FD_RINGBUFFER_OBJECTs.
authorEric Anholt <eric@anholt.net>
Fri, 8 May 2020 21:53:47 +0000 (14:53 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 14:12:15 +0000 (14:12 +0000)
commitb1151cd2ffc821a09130f87c2a266b2bfe7b0822
treef454bb22fab4288910fedab98d37517feb5c4b6d
parenta6fe0799faf73970ac76e26bac2f7b38195fe1e1
freedreno: Avoid duplicate BO relocs in FD_RINGBUFFER_OBJECTs.

For the piglit drawoverhead case, 5/18 of the objects' relocs were
duplicated.  We can dedupe them at object create time (since objects are
long-lived) and avoid repeated relocation work at emit time.

nohw drawoverhead program statechange throughput 2.34082% +/- 0.645832%
(n=10).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
src/freedreno/drm/msm_ringbuffer_sp.c