From fa42fa1a60debf26cdf86f40c0c805b0fc3b444f Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 22 Jun 2018 19:16:43 +0200 Subject: radv: emit PIPELINESTAT_{START,STOP} events for pipeline stats queries Ported from RadeonSI. This appears to fix some random fails with: dEQP-VK.query_pool.statistics_query.* Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/si_cmd_buffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/amd/vulkan/si_cmd_buffer.c') diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index e350bccae33..3491710ad86 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -937,6 +937,16 @@ si_cs_emit_cache_flush(struct radeon_cmdbuf *cs, */ if (cp_coher_cntl) si_emit_acquire_mem(cs, is_mec, false, chip_class >= GFX9, cp_coher_cntl); + + if (flush_bits & RADV_CMD_FLAG_START_PIPELINE_STATS) { + radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0)); + radeon_emit(cs, EVENT_TYPE(V_028A90_PIPELINESTAT_START) | + EVENT_INDEX(0)); + } else if (flush_bits & RADV_CMD_FLAG_STOP_PIPELINE_STATS) { + radeon_emit(cs, PKT3(PKT3_EVENT_WRITE, 0, 0)); + radeon_emit(cs, EVENT_TYPE(V_028A90_PIPELINESTAT_STOP) | + EVENT_INDEX(0)); + } } void -- cgit v1.2.3