r600/eg: rework atomic counter emission with flushes
authorDave Airlie <airlied@redhat.com>
Tue, 7 Aug 2018 00:41:20 +0000 (01:41 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 21 Aug 2018 19:45:38 +0000 (20:45 +0100)
commit32529e60849dd20d167f14cb8542c5798343f0e0
tree91003a038f71084695c86be8b3a889648a282c90
parent41d58e20983576212636c11afd6ca25ebd60b68f
r600/eg: rework atomic counter emission with flushes

With the current code, we didn't do the space checks prior
to atomic counter setup emission, but we also didn't add
atomic counters to the space check so we could get a flush
later as well.

These flushes would be bad, and lead to problems with
parallel tests. We have to ensure the atomic counter copy in,
draw emits and counter copy out are kept in the same command
submission unit.

This reworks the code to drop some useless masks, make the
counting separate to the emits, and make the space checker
handle atomic counter space.

[airlied: want this in 18.2]

Fixes: 06993e4ee (r600: add support for hw atomic counters. (v3))
src/gallium/drivers/r600/evergreen_compute.c
src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_state_common.c