diff options
author | Marek Olšák <[email protected]> | 2018-03-10 19:23:45 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-03-11 13:14:27 -0400 |
commit | 163a29099ab62c8b60ccc02d592066e005ec52de (patch) | |
tree | 2f59f8b5675a9e07c38650bd165f6a521050913f /src/gallium | |
parent | 0f0a6fa21dc240fca99a3a110a6c0dfac6d2a376 (diff) |
gallium/util: add helper util_wait_for_idle
This is an old patch that I had.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_helpers.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_helpers.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxiliary/util/u_helpers.c index e0feade3acd..365238631a2 100644 --- a/src/gallium/auxiliary/util/u_helpers.c +++ b/src/gallium/auxiliary/util/u_helpers.c @@ -118,6 +118,7 @@ util_upload_index_buffer(struct pipe_context *pipe, return *out_buffer != NULL; } +/* This is a helper for hardware bring-up. Don't remove. */ struct pipe_query * util_begin_pipestat_query(struct pipe_context *ctx) { @@ -130,6 +131,7 @@ util_begin_pipestat_query(struct pipe_context *ctx) return q; } +/* This is a helper for hardware bring-up. Don't remove. */ void util_end_pipestat_query(struct pipe_context *ctx, struct pipe_query *q, FILE *f) @@ -167,3 +169,13 @@ util_end_pipestat_query(struct pipe_context *ctx, struct pipe_query *q, stats.ds_invocations, stats.cs_invocations); } + +/* This is a helper for hardware bring-up. Don't remove. */ +void +util_wait_for_idle(struct pipe_context *ctx) +{ + struct pipe_fence_handle *fence = NULL; + + ctx->flush(ctx, &fence, 0); + ctx->screen->fence_finish(ctx->screen, NULL, fence, PIPE_TIMEOUT_INFINITE); +} diff --git a/src/gallium/auxiliary/util/u_helpers.h b/src/gallium/auxiliary/util/u_helpers.h index ab970d791b1..1e57e32959b 100644 --- a/src/gallium/auxiliary/util/u_helpers.h +++ b/src/gallium/auxiliary/util/u_helpers.h @@ -57,6 +57,9 @@ void util_end_pipestat_query(struct pipe_context *ctx, struct pipe_query *q, FILE *f); +void +util_wait_for_idle(struct pipe_context *ctx); + #ifdef __cplusplus } #endif |