diff options
author | Jason Ekstrand <[email protected]> | 2018-09-14 17:06:48 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-09-17 02:57:21 -0500 |
commit | 40149441b8e2c9b806fc0f6a387a7653d97a3b59 (patch) | |
tree | 020386207f3e3786ab9bd5e1ac120428f3e0c060 /src/intel/vulkan/genX_query.c | |
parent | b11e9b5ffe648b7cd5dd458d6bae52fbd20a4640 (diff) |
anv: Add a mi_memset and use it for zeroing queries
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_query.c')
-rw-r--r-- | src/intel/vulkan/genX_query.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index 56d18e021e4..4ccbe2975de 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -346,21 +346,11 @@ emit_zero_queries(struct anv_cmd_buffer *cmd_buffer, struct anv_query_pool *pool, uint32_t first_index, uint32_t num_queries) { - const uint32_t num_elements = pool->stride / sizeof(uint64_t); - for (uint32_t i = 0; i < num_queries; i++) { struct anv_address slot_addr = anv_query_address(pool, first_index + i); - for (uint32_t j = 1; j < num_elements; j++) { - anv_batch_emit(&cmd_buffer->batch, GENX(MI_STORE_DATA_IMM), sdi) { - sdi.Address = anv_address_add(slot_addr, j * sizeof(uint64_t)); - sdi.ImmediateData = 0ull; - } - anv_batch_emit(&cmd_buffer->batch, GENX(MI_STORE_DATA_IMM), sdi) { - sdi.Address = anv_address_add(slot_addr, j * sizeof(uint64_t) + 4); - sdi.ImmediateData = 0ull; - } - } + genX(cmd_buffer_mi_memset)(cmd_buffer, anv_address_add(slot_addr, 8), + 0, pool->stride - 8); emit_query_availability(cmd_buffer, slot_addr); } } |