diff options
author | Rob Clark <[email protected]> | 2014-01-07 21:39:13 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-01-08 16:30:18 -0500 |
commit | 646c16af6e23184078995bcd3fc3db00b7c21250 (patch) | |
tree | cf2872e2d6250ba324c6563246650c44275b563b /src/gallium/drivers/freedreno/freedreno_gmem.c | |
parent | 725d736f6a6a14d10223888d585ddab80ee803f0 (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_gmem.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_gmem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index 0270538a3d0..6a55aa4c133 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -260,6 +260,9 @@ render_tiles(struct fd_context *ctx) ctx->emit_tile_init(ctx); + if (ctx->restore) + ctx->stats.batch_restore++; + for (i = 0; i < (gmem->nbins_x * gmem->nbins_y); i++) { struct fd_tile *tile = &ctx->tile[i]; @@ -311,11 +314,14 @@ fd_gmem_render_tiles(struct pipe_context *pctx) fd_ringmarker_mark(ctx->draw_end); fd_ringmarker_mark(ctx->binning_end); + ctx->stats.batch_total++; + if (sysmem) { DBG("rendering sysmem (%s/%s)", util_format_short_name(pipe_surface_format(pfb->cbufs[0])), util_format_short_name(pipe_surface_format(pfb->zsbuf))); render_sysmem(ctx); + ctx->stats.batch_sysmem++; } else { struct fd_gmem_stateobj *gmem = &ctx->gmem; calculate_tiles(ctx); @@ -323,6 +329,7 @@ fd_gmem_render_tiles(struct pipe_context *pctx) util_format_short_name(pipe_surface_format(pfb->cbufs[0])), util_format_short_name(pipe_surface_format(pfb->zsbuf))); render_tiles(ctx); + ctx->stats.batch_gmem++; } /* GPU executes starting from tile cmds, which IB back to draw cmds: */ |