From 2bf01845d012a4491f09c1d9927d1572e90eb0a1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 26 Jul 2024 10:49:42 -0400 Subject: [PATCH] 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 Part-of: --- src/asahi/lib/shaders/query.cl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/asahi/lib/shaders/query.cl b/src/asahi/lib/shaders/query.cl index ba19eccb9f1..f42734c55b8 100644 --- a/src/asahi/lib/shaders/query.cl +++ b/src/asahi/lib/shaders/query.cl @@ -10,6 +10,9 @@ 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;