The driver uses (and must use) the flushed flag of queries as a hint that
it does not have to check for synchronization with currently queued up
commands. Deferred flushes do not actually flush queued up commands, so
we must not set the flushed flag for them.
Found by inspection.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
struct pipe_context *pipe = tc->pipe;
struct threaded_query *tq, *tmp;
- LIST_FOR_EACH_ENTRY_SAFE(tq, tmp, &tc->unflushed_queries, head_unflushed) {
- tq->flushed = true;
- LIST_DEL(&tq->head_unflushed);
+ if (!(flags & PIPE_FLUSH_DEFERRED)) {
+ LIST_FOR_EACH_ENTRY_SAFE(tq, tmp, &tc->unflushed_queries, head_unflushed) {
+ tq->flushed = true;
+ LIST_DEL(&tq->head_unflushed);
+ }
}
/* TODO: deferred flushes? */
/* The query is added to the list in end_query and removed in flush. */
struct list_head head_unflushed;
- /* Whether pipe->flush has been called after end_query. */
+ /* Whether pipe->flush has been called in non-deferred mode after end_query. */
bool flushed;
};