[Mesa-dev] [PATCH 2/2] ddebug: always flush when requested, even when hang detection is disabled

Nicolai Hähnle nhaehnle at gmail.com
Thu Dec 6 12:57:35 UTC 2018


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/auxiliary/driver_ddebug/dd_draw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/auxiliary/driver_ddebug/dd_draw.c b/src/gallium/auxiliary/driver_ddebug/dd_draw.c
index a930299ebb7..f5b94356119 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_draw.c
+++ b/src/gallium/auxiliary/driver_ddebug/dd_draw.c
@@ -1104,20 +1104,22 @@ dd_before_draw(struct dd_context *dctx, struct dd_draw_record *record)
    if (dscreen->timeout_ms > 0) {
       if (dscreen->flush_always && dctx->num_draw_calls >= dscreen->skip_count) {
          pipe->flush(pipe, &record->prev_bottom_of_pipe, 0);
          screen->fence_reference(screen, &record->top_of_pipe, record->prev_bottom_of_pipe);
       } else {
          pipe->flush(pipe, &record->prev_bottom_of_pipe,
                      PIPE_FLUSH_DEFERRED | PIPE_FLUSH_BOTTOM_OF_PIPE);
          pipe->flush(pipe, &record->top_of_pipe,
                      PIPE_FLUSH_DEFERRED | PIPE_FLUSH_TOP_OF_PIPE);
       }
+   } else if (dscreen->flush_always && dctx->num_draw_calls >= dscreen->skip_count) {
+      pipe->flush(pipe, NULL, 0);
    }
 
    mtx_lock(&dctx->mutex);
    if (unlikely(dctx->num_records > 10000)) {
       dctx->api_stalled = true;
       /* Since this is only a heuristic to prevent the API thread from getting
        * too far ahead, we don't need a loop here. */
       cnd_wait(&dctx->cond, &dctx->mutex);
       dctx->api_stalled = false;
    }
-- 
2.19.1



More information about the mesa-dev mailing list