freedreno: avoid no-op flushes by re-using last-fence
authorRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 12:05:49 +0000 (08:05 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 26 Oct 2018 22:10:00 +0000 (18:10 -0400)
commitddb7fadaf8b1aa3004e72d6b0e28e465f8f45fba
tree538551a48ca92cd881434242674df62e6df7cc1f
parent01194cd5826fb58a4f9464594850ffc3f4ae6073
freedreno: avoid no-op flushes by re-using last-fence

Noticed that with webgl (in chromium, at least) we end up generating a
lot of no-op submits just to get a fence.  Tracking the last fence and
returning that if there is no rendering since last flush avoids this.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a6xx/fd6_blitter.c
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_draw.c
src/gallium/drivers/freedreno/freedreno_resource.c