- October 28, 2013 at 5:45 am #31529
while using the pvrscope library, I found a weird problem the value I get from funtion PVRScopeReadCountersThenSetGroup(m_pPVRScopeData, &m_sReading, nTimeUS, nGroupSelect),
If I call this function every 50ms or 100ms, when the screen is static, it output totally different value. I am pretty sure the average frame time is 12ms, and powertune shows very stable values, and I am shutting down the perfsever when I run my own apps.
So could you please tell me how this function works, how it connect with the circular buffer? I understand perfsever visited it every 2ms to get the buffer and we could see it on power tune. So if I call the function PVRScopeReadCountersThenSetGroup every 50ms, what exactly does it do? Will it just call driver service to get the recently buffer, and actually the value I got is the last 2ms(if the buffer could only support 2ms)? Or it works underground to visit the driver service to get the buffer every 2 ms and keep it, and whenever I call it, it calculated the counters I want in my visit period, like 50ms, honestly this is the way I want.
Could you please help me as soon as possible? because I want to do a small project on my graphic performance and do some dynamic feedback, the dealine is coming, I am still stuck in here.
thank you very much!!!October 28, 2013 at 11:33 am #38171
When you say static, do you mean the GPU isn’t doing any work or the same frame is being rendered repeatedly? In the later case the workload should be fairly consistent, assuming other factors such as power management and memory bandwidth use aren’t affecting the GPU’s execution time.
I suspect you’re not sampling frequently enough. The circular buffer can only hold a finite amount of data. If you do not sample at a high enough frequency, old values may be overwritten as new data is collected. As mentioned in our other discussion, it may be a good idea to sample on a background thread so you can easily control the sampling frequency.
JoeOctober 28, 2013 at 12:19 pm #38172
Then the PVRScopeReadCountersThenSetGroup function works like that: Every time I call it, it will grab the buffer.October 28, 2013 at 12:22 pm #38173
Yes – the function will grab all of the data from the driver’s circular buffer.
JoeOctober 28, 2013 at 3:10 pm #38174
I find one thing, if I do smooth on my fps got from pvrscope. It looks quite resonable.