iris: Reorder the loops in iris_fence_await() for clarity.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Aug 2020 16:47:13 +0000 (09:47 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 27 Aug 2020 16:40:22 +0000 (16:40 +0000)
commite98c7a66347a05fc166c377ab1abb77955aff775
tree58ca0f53ddd2e00986f193b15b3067f6be8dda2e
parent45793c00d29507c6de0193fbd6c627191ba50bed
iris: Reorder the loops in iris_fence_await() for clarity.

Swapping the order of the loops makes the logic much easier to follow:
for each point in our fence, if it hasn't gone by, make future work in
all batches depend on it.  Both loops are necessary, and now it's
clearer why.

(This doesn't actually fix a bug but needs to be cherry-picked for
the next patch to apply, which does fix a bug.)

Fixes: f459c56be6b ("iris: Add fence support using drm_syncobj")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Yang A Shi <yang.a.shi@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6463>
src/gallium/drivers/iris/iris_fence.c