summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/auxiliary/util/u_threaded_context.c8
-rw-r--r--src/gallium/auxiliary/util/u_threaded_context.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c
index ccce12b00ce..510201df617 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.c
+++ b/src/gallium/auxiliary/util/u_threaded_context.c
@@ -1809,9 +1809,11 @@ tc_flush(struct pipe_context *_pipe, struct pipe_fence_handle **fence,
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? */
diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h
index ac7bc3dec73..a9f79a66d42 100644
--- a/src/gallium/auxiliary/util/u_threaded_context.h
+++ b/src/gallium/auxiliary/util/u_threaded_context.h
@@ -264,7 +264,7 @@ struct threaded_query {
/* 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;
};