hk: switch to 64-bit queries

for timestamps

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31908>
This commit is contained in:
Alyssa Rosenzweig 2024-10-16 15:20:30 -04:00
parent b1b125dbe6
commit fe84aaa8a7
2 changed files with 3 additions and 6 deletions

View file

@ -10,9 +10,6 @@
static inline void
write_query_result(uintptr_t dst_addr, int32_t idx, bool is_64, uint64_t result)
{
/* TODO: do we want real 64-bit stats? sync with CPU impl */
result &= 0xffffffff;
if (is_64) {
global uint64_t *out = (global uint64_t *)dst_addr;
out[idx] = result;

View file

@ -32,9 +32,7 @@
#include "vulkan/vulkan_core.h"
struct hk_query_report {
/* TODO: do we want this to be legit u64? */
uint32_t value;
uint32_t padding;
uint64_t value;
};
static uint16_t *
@ -311,6 +309,8 @@ emit_zero_queries(struct hk_cmd_buffer *cmd, struct hk_query_pool *pool,
for (unsigned j = 0; j < hk_reports_per_query(pool); ++j) {
hk_queue_write(cmd, report + (j * sizeof(struct hk_query_report)), 0,
false);
hk_queue_write(cmd, report + (j * sizeof(struct hk_query_report)) + 4,
0, false);
}
}
}