On Sun, Oct 22, 2017 at 9:07 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haeh...@amd.com>
>
> 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.
> ---
>  src/gallium/auxiliary/util/u_threaded_context.c | 8 +++++---
>  src/gallium/auxiliary/util/u_threaded_context.h | 2 +-
>  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 7e28b87a7ff..24fab7f5cb6 100644
> --- a/src/gallium/auxiliary/util/u_threaded_context.c
> +++ b/src/gallium/auxiliary/util/u_threaded_context.c
> @@ -1783,23 +1783,25 @@ tc_create_video_buffer(struct pipe_context *_pipe,
>   */
>
>  static void
>  tc_flush(struct pipe_context *_pipe, struct pipe_fence_handle **fence,
>           unsigned flags)
>  {
>     struct threaded_context *tc = threaded_context(_pipe);
>     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)) {

Do we also need to check the ASYNC flag here? Or top-of-pipe and
bottom-of-pipe flags that don't have to flush caches if I understand
correctly?

Marek

> +      LIST_FOR_EACH_ENTRY_SAFE(tq, tmp, &tc->unflushed_queries, 
> head_unflushed) {
> +         tq->flushed = true;
> +         LIST_DEL(&tq->head_unflushed);
> +      }
>     }
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to