Are there any graphics programmers who specialise in mobile here? I got a really specific thing I wanna get opinions on but I'm unemployed and have no one else to ask.
it's about extracting fps data from a trace profile.
>ran a capture of a 3D scene/app using android GPU inspector
>it recorded all the vulkan api calls.
>run a SQL query to extract every 'QueuePresentKHR' call
>use that to get a roundabout fps
But I'm just fucking around with chatgpt on my own I have no idea if this is an accurate fps. Is there anyway this could be inaccurate?
WITH calls AS (
SELECT
ts,
(ts / 1000000000) AS sec_bucket -- Integer division to group into seconds
FROM internal_slice
WHERE name = 'QueuePresentKHR'
),
pairs AS (
SELECT
curr.sec_bucket AS second,
curr.ts - MAX(prev.ts) AS delta_ns
FROM calls curr
JOIN calls prev
ON curr.sec_bucket = prev.sec_bucket AND prev.ts < curr.ts
GROUP BY curr.ts, curr.sec_bucket
)
SELECT
second,
COUNT(*) AS frame_count,
AVG(delta_ns) AS avg_interval_ns,
1e9 / AVG(delta_ns) AS fps
FROM pairs
GROUP BY second
ORDER BY second;