summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_context.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-01-07 21:39:13 -0500
committerRob Clark <[email protected]>2014-01-08 16:30:18 -0500
commit646c16af6e23184078995bcd3fc3db00b7c21250 (patch)
treecf2872e2d6250ba324c6563246650c44275b563b /src/gallium/drivers/freedreno/freedreno_context.h
parent725d736f6a6a14d10223888d585ddab80ee803f0 (diff)
freedreno: add basic query support
Add for now some simple/basic query support (ie. things not actually requiring the GPU). Might change around a bit when I actually add GPU queries, but for now this enables some useful performance info in the GALLIUM_HUD. For example: GALLIUM_HUD=fps+batches+batches-sysmem+batches-gmem+restores,draw-calls The driver specific specific queries are: + draw-calls + batches - number of batches per second, sum of batches-sysmem plus batches-gmem + batches-gmem - render a set of tiles in GMEM, for each tile (optionally) system mem -> gmem (restore), plus N draws, plus gmem -> system mem (resolve) per second + batches-sysmem - N draws to system memory (GMEM bypass) per second + restores - number of GMEM batches that required restore per second Ideally for GMEM rendering, you want batches-gmem to equal fps. If the app is doing something that triggers multiple passes (ie. requires extra round trip gmem <-> system memory) then the # of batches per second will go up relative to fps. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_context.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index 5373de6c638..0871efc53c7 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -134,7 +134,15 @@ struct fd_context {
FD_GMEM_BLEND_ENABLED = 0x10,
FD_GMEM_LOGICOP_ENABLED = 0x20,
} gmem_reason;
- unsigned num_draws;
+ unsigned num_draws; /* number of draws in current batch */
+
+ /* Stats/counters:
+ */
+ struct {
+ uint64_t prims_emitted;
+ uint64_t draw_calls;
+ uint64_t batch_total, batch_sysmem, batch_gmem, batch_restore;
+ } stats;
/* we can't really sanely deal with wraparound point in ringbuffer
* and because of the way tiling works we can't really flush at