summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2019-05-20 07:56:18 +0100
committerLionel Landwerlin <[email protected]>2019-12-13 11:27:22 +0200
commitbd888bc1d65cefbd4e3fc0a40d416c75d9632951 (patch)
treec566453a19e10d1e1483d63c069406f2498b01e2 /src/gallium/drivers
parenta575b3cd5c1e61a7e92fa2521ced95d24b64f392 (diff)
i965/iris: perf-queries: don't invalidate/flush 3d pipeline
Our current implementation of performance queries is fairly harsh because it completely flushes and invalidates the 3d pipeline caches at the beginning and end of each query. An argument can be made that this is how performance should be measured but it probably doesn't reflect what the application is actually doing and the actual cost of draw calls. A more appropriate approach is to just stall the pipeline at scoreboard, so that we measure the effect of a draw call without having the pipeline in a completely pristine state for every draw call. v2: Use end of pipe PIPE_CONTROL instruction for Iris (Ken) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_perf.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gallium/drivers/iris/iris_perf.c b/src/gallium/drivers/iris/iris_perf.c
index 7c0378aacee..1e5ec8140dc 100644
--- a/src/gallium/drivers/iris/iris_perf.c
+++ b/src/gallium/drivers/iris/iris_perf.c
@@ -31,18 +31,11 @@ iris_oa_bo_alloc(void *bufmgr, const char *name, uint64_t size)
}
static void
-iris_perf_emit_mi_flush(struct iris_context *ice)
+iris_perf_emit_stall_at_pixel_scoreboard(struct iris_context *ice)
{
- const int flags = PIPE_CONTROL_RENDER_TARGET_FLUSH |
- PIPE_CONTROL_INSTRUCTION_INVALIDATE |
- PIPE_CONTROL_CONST_CACHE_INVALIDATE |
- PIPE_CONTROL_DATA_CACHE_FLUSH |
- PIPE_CONTROL_DEPTH_CACHE_FLUSH |
- PIPE_CONTROL_VF_CACHE_INVALIDATE |
- PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |
- PIPE_CONTROL_CS_STALL;
- iris_emit_pipe_control_flush(&ice->batches[IRIS_BATCH_RENDER],
- "OA metrics", flags);
+ iris_emit_end_of_pipe_sync(&ice->batches[IRIS_BATCH_RENDER],
+ "OA metrics",
+ PIPE_CONTROL_STALL_AT_SCOREBOARD);
}
static void
@@ -106,7 +99,8 @@ iris_perf_init_vtbl(struct gen_perf_config *perf_cfg)
perf_cfg->vtbl.bo_unreference = (bo_unreference_t)iris_bo_unreference;
perf_cfg->vtbl.bo_map = (bo_map_t)iris_bo_map;
perf_cfg->vtbl.bo_unmap = (bo_unmap_t)iris_bo_unmap;
- perf_cfg->vtbl.emit_mi_flush = (emit_mi_flush_t)iris_perf_emit_mi_flush;
+ perf_cfg->vtbl.emit_stall_at_pixel_scoreboard =
+ (emit_mi_flush_t)iris_perf_emit_stall_at_pixel_scoreboard;
perf_cfg->vtbl.emit_mi_report_perf_count =
(emit_mi_report_t)iris_perf_emit_mi_report_perf_count;