libagx: mask counters to 32-bit

possibly we should use real 64-bit counters, that's something for later though.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
This commit is contained in:
Alyssa Rosenzweig
2024-07-26 10:49:42 -04:00
committed by Marge Bot
parent 16caad4038
commit 2bf01845d0

View File

@@ -10,6 +10,9 @@
static inline void static inline void
write_query_result(uintptr_t dst_addr, int32_t idx, bool is_64, uint64_t result) 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) { if (is_64) {
global uint64_t *out = (global uint64_t *)dst_addr; global uint64_t *out = (global uint64_t *)dst_addr;
out[idx] = result; out[idx] = result;