clover/queue: Flush automatically if applications do not flush themselves
authorKarol Herbst <kherbst@redhat.com>
Wed, 4 Nov 2020 22:05:51 +0000 (23:05 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 10 Nov 2020 19:28:26 +0000 (19:28 +0000)
commit20a3ec2d771d7f8942018b714c64925a870a2062
treed417bbf8686425d822b3a2fea4ffceb390a79c83
parente8a1aa9e940af5706fc78d77c4cd509c2f480a6b
clover/queue: Flush automatically if applications do not flush themselves

With the image_read_write OpenCL CTS we can get a stack overflow handling
all the events as the application itself never flushes.

We need to address this in two ways:
1. flush the queue once an abritary amoung of events piled up.
2. Drop event deps once they get a fence assigned.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7460>
src/gallium/frontends/clover/core/event.cpp
src/gallium/frontends/clover/core/event.hpp
src/gallium/frontends/clover/core/queue.cpp
src/gallium/frontends/clover/core/queue.hpp