diff options
author | Rob Clark <[email protected]> | 2014-05-10 13:45:54 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-05-13 18:33:19 -0400 |
commit | b8f78e18907be379415c8c804b634808349fc1d9 (patch) | |
tree | 6a8fe75487de633ad4329f30e49ed6f031c22652 /src/gallium/drivers/freedreno/freedreno_draw.c | |
parent | 13a0cf4480b908aafa337c121cbdfc338318f088 (diff) |
freedreno: add support for hw queries
Real GPU queries need some infrastructure to track samples per tile and
accumulate the results. But fortunately this can be shared across GPU
generation.
See:
https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_draw.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_draw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 11bb8d8333d..1289bb4b8f2 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -36,6 +36,7 @@ #include "freedreno_context.h" #include "freedreno_state.h" #include "freedreno_resource.h" +#include "freedreno_query_hw.h" #include "freedreno_util.h" @@ -156,6 +157,7 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) /* and any buffers used, need to be resolved: */ ctx->resolve |= buffers; + fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_DRAW); ctx->draw(ctx, info); } @@ -188,6 +190,8 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, util_format_short_name(pipe_surface_format(pfb->cbufs[0])), util_format_short_name(pipe_surface_format(pfb->zsbuf))); + fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_CLEAR); + ctx->clear(ctx, buffers, color, depth, stencil); ctx->dirty |= FD_DIRTY_ZSA | |