summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_query.cpp
diff options
context:
space:
mode:
authorTim Rowley <timothy.o.rowley@intel.com>2016-08-05 11:17:25 -0600
committerTim Rowley <timothy.o.rowley@intel.com>2016-08-10 11:08:23 -0500
commit6625fd08db0a24fad54d69ca1eb3935304b3a53e (patch)
tree7d9eb12e0fc2a03d326b1384647add15777fcdc3 /src/gallium/drivers/swr/swr_query.cpp
parent047493c1980deddc916294d8cb498d5e0633ad82 (diff)
downloadexternal_mesa3d-6625fd08db0a24fad54d69ca1eb3935304b3a53e.zip
external_mesa3d-6625fd08db0a24fad54d69ca1eb3935304b3a53e.tar.gz
external_mesa3d-6625fd08db0a24fad54d69ca1eb3935304b3a53e.tar.bz2
swr: [rasterizer core] fundamentally change how stats work
Add a per draw stats callback to update driver stats. Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
Diffstat (limited to 'src/gallium/drivers/swr/swr_query.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_query.cpp11
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 5b8f059..35d0e53 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)