Hi,
I'm having an issue getting plausible values at certain times with a disjoint timer query. I've read the discussion in here but my issue seems slightly different.
I'm not trying to time individual draw calls but rather the time it takes for complete the backbuffer.
I'm getting "roughly" consistent numbers for a large part of the frames, but frequently get 18446744073709551615 (2^64-1). This happens even when glGetQueryObjectuiv() returns true for an available query. Here's a snippet of the code (which is a slightly modified version this Unity plugin to use a 64-bit query):
GLuint available = 0; glGetQueryObjectuiv(queryObject, GL_QUERY_RESULT_AVAILABLE, &available); if (available == GL_TRUE) { GLuint64 elapsed_time_ns; glGetQueryObjectui64vEXT(queryObject, GL_QUERY_RESULT, &elapsed_time_ns); if (glGetError() == GL_NO_ERROR) { ... } ... }
I've tried forcing a synchronous call by ignoring the availability of the result. In such cases, the MAX_UINT above doesn't seem to occur and the values are "roughly" consistent (sometimes a few ms apart, but that's perhaps due HW pipelining).
I've gone through the extension spec but I can't find anything that might explain this. Could I've missed something?
I'm running this on a Samsung A20 with a Mali-G71. I've tried the same test on a device with an old Adreno 330 and I don't seem to get the same issue though.
I have created an internal ticket to handle this. I had a brief check with the MGD file, it seems to me that it queries the elapsed time stamp for every renderpass. That should be OK to me.
so I am setting up the Arm DS environment to run the trace, I hope it can give me some ideas
Cheers!
Sorry, the replay functionality has been removed from Arm DS 2020 version.
So can you please use patrace to capture?
https://github.com/ARM-software/patrace
Hi Sunny,
That's the shame (I was actually aware of that functionality).
I had a look at patrace's docs and it seems to require a rooted phone to trace the calls. Do you happen to know if there's a way to use it with commercial devices?
*That's the shame (I WASN'T actually aware of that functionality).
I'll have a look at apitrace (if you think that would help). I'm not sure it has the same limitation.
Peter HarrisJosé Emilio Muñoz-López
Do you know if we can capture patrace on non-root device?
I haven't used apitrace, but looks similar