vc4: Try to fix the HW-2116 workaround.
authorEric Anholt <eric@anholt.net>
Thu, 6 Oct 2016 21:45:23 +0000 (14:45 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 7 Oct 2016 01:29:12 +0000 (18:29 -0700)
commitcb328123fe2fda48add8a754b84b22e54f9c5912
tree907a74e308eae112ab8274fa16f59be4e0090f9e
parentbca9a58d04b556077c540984f2328eaa0ff26f15
vc4: Try to fix the HW-2116 workaround.

We were incrementing the count at the end of vc4_start_draw(), except that
that function returns immediately if we've already started drawing on this
batch.  It also failed to count the statechanges from the GFXH-515
workaround.

This incidentally allows repeated glClear() to be coalesced, because the
fast clears aren't counted in draw_calls_queued any more.  Fixes most of
the extra flushes in Processing, which emits glClear(Z|S); glClear(Z);
glClear(C) during its frame setup.

Improves performance of Processing's QuadRendering demo at 5000 quads by
3.33538% +/- 2.05846% (n=21 before, 15 after)
src/gallium/drivers/vc4/vc4_draw.c