Skip to content

tu: ZPASS_DONE events with sample count writes can misbehave

Zan Dobersek requested to merge zdobersek/mesa-fork:work/tu_zpass_done into main

What does this MR do and why?

tu: ZPASS_DONE events with sample count writes can misbehave

On newer devices where ZPASS_DONE events have sample count writing
abilities the firmware expects these events to come in begin-end pairs,
essentially corresponding to a typical occlusion query usage, or as a
standalone end-point event. Since this event is also used in the autotuner
we have to avoid event pairs to be emitted in a nested fashion.

At the beginning of the occlusion query, if outside a renderpass, we emit
an end-point ZPASS_DONE event in order to avoid the autotuner nesting into
this event pair. The ZPASS_DONE event at the end of the occlusion query
then acts as a standalone end-point event.

Similarly, the autotuner, knowing if the embedded renderpass uses an
occlusion query, adds the end-point ZPASS_DONE event at its beginning if
that is the case, avoiding having the occlusion query's ZPASS_DONE events
nested inside its own event pair.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>

Merge request reports