From 60e0db3bfb05660fb3d2c868838635d667f8966a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 18 Dec 2019 09:16:44 +0200 Subject: [PATCH] anv: fix intel perf queries availability writes The availability is not written at the location changed in ee6fbb95a74d... Signed-off-by: Lionel Landwerlin Fixes: ee6fbb95a74d ("anv: Properly handle host query reset of performance queries") Reviewed-by: Jason Ekstrand --- src/intel/vulkan/genX_query.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index 6a512d3ea7b..aa02db9ab05 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -491,9 +491,8 @@ emit_zero_queries(struct anv_cmd_buffer *cmd_buffer, for (uint32_t i = 0; i < num_queries; i++) { struct anv_address slot_addr = anv_query_address(pool, first_index + i); - gen_mi_memset(b, slot_addr, 0, pool->stride - 8); - emit_query_mi_availability(b, anv_address_add(slot_addr, - pool->stride - 8), true); + gen_mi_memset(b, anv_address_add(slot_addr, 8), 0, pool->stride - 8); + emit_query_mi_availability(b, slot_addr, true); } break; @@ -535,14 +534,8 @@ void genX(CmdResetQueryPool)( struct gen_mi_builder b; gen_mi_builder_init(&b, &cmd_buffer->batch); - for (uint32_t i = 0; i < queryCount; i++) { - emit_query_mi_availability( - &b, - anv_address_add( - anv_query_address(pool, firstQuery + i), - pool->stride - 8), - false); - } + for (uint32_t i = 0; i < queryCount; i++) + emit_query_mi_availability(&b, anv_query_address(pool, firstQuery + i), false); break; } @@ -781,9 +774,7 @@ void genX(CmdEndQueryIndexedEXT)( intel_perf_mi_rpc_offset(true)); rpc.ReportID = 0xdeadbeef; /* This goes in the first dword */ } - emit_query_mi_availability(&b, - anv_address_add(query_addr, pool->stride - 8), - true); + emit_query_mi_availability(&b, query_addr, true); break; } -- 2.30.2