diff options
author | Tim Rowley <[email protected]> | 2016-08-05 11:17:25 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:08:23 -0500 |
commit | 6625fd08db0a24fad54d69ca1eb3935304b3a53e (patch) | |
tree | 7d9eb12e0fc2a03d326b1384647add15777fcdc3 /src/gallium/drivers/swr/swr_query.cpp | |
parent | 047493c1980deddc916294d8cb498d5e0633ad82 (diff) |
swr: [rasterizer core] fundamentally change how stats work
Add a per draw stats callback to update driver stats.
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_query.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_query.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/swr/swr_query.cpp b/src/gallium/drivers/swr/swr_query.cpp index 5b8f059cdae..35d0e53fb23 100644 --- a/src/gallium/drivers/swr/swr_query.cpp +++ b/src/gallium/drivers/swr/swr_query.cpp @@ -91,18 +91,17 @@ swr_gather_stats(struct pipe_context *pipe, struct swr_query *pq) /* nothing to do here */ break; default: - /* - * All other results are collected from SwrCore counters via - * SwrGetStats. This returns immediately, but results are later filled - * in by the backend. Fence status is the only indication of - * completion. */ - SwrGetStats(ctx->swrContext, &result->core); + /* TODO: should fence instead of stalling pipeline */ + SwrWaitForIdle(ctx->swrContext); + memcpy(&result->core, &ctx->stats, sizeof(result->core)); +#if 0 if (!pq->fence) { struct swr_screen *screen = swr_screen(pipe->screen); swr_fence_reference(pipe->screen, &pq->fence, screen->flush_fence); } swr_fence_submit(ctx, pq->fence); +#endif /* Only change stat collection if there are no active queries */ if (ctx->active_queries == 0) |