freedreno: Fix acc query handling in the presence of batch reordering.
authorEric Anholt <eric@anholt.net>
Fri, 27 Mar 2020 22:55:14 +0000 (15:55 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 21:35:21 +0000 (21:35 +0000)
commit36612c96bd2a354b4c31eeb331d2f4bbad2f210e
tree27f749818ff1b2c335c338690ea751b8e4ed3d5e
parenta99ff933748a7ad00f9fcb5cb0dde536c3bef149
freedreno: Fix acc query handling in the presence of batch reordering.

When we switch batches and start a new draw, we need to cap the queries in
the previous batch and start queries again in the new one.

FD_STAGE_NULL got renamed to 0 so that it would naturally return
!is_active and end the queries at the end of the batch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_query_acc.c
src/gallium/drivers/freedreno/freedreno_query_acc.h