PDA

View Full Version : performance metrics



rcpedersen
12-21-2007, 05:04 AM
Both NVIDIA and ATI has special performance counters.

One usefull counter which NVIDIA has is number of fragments killed by the zcull unit. Is it possible to read these counters and how?

Dark Photon
12-21-2007, 07:11 AM
Yes, with NVPerfSDK (http://developer.nvidia.com/object/nvperfsdk_home.html).

I've used this on Linux and it "<u>was</u>" very useful. Unfortunately, NVidia hasn't been updating it at all, and the current is broken with modern kernels. This thread (http://www.nvnews.net/vbulletin/showthread.php?t=93456) did have a response from an NVidia guy saying an NVPerfSDK update for GeForce 8 was coming around Nov '07 which would fix it, but seems there's some revisionist history going on with NVNews.net (http://nvnews.net), as both his reply and my response to his reply are gone. One reason forums suck and mailing lists are better (don't even get me started on the cgshaders.org (http://cgshaders.org)/shadertech.com (http://www.shadertech.com/forums/) forums, or lack thereof, anymore).

rcpedersen
12-21-2007, 02:58 PM
Cool.
Unfortunately I only have my ATI 9600 right now.

Humus
12-22-2007, 07:45 AM
You can use gDEBugger (http://www.gremedy.com/). It has support for ATI hardware counters.

rcpedersen
12-22-2007, 02:12 PM
I know the gDEBugger, but since I have a background in DirectX with tools such as Microsoft PIX and NVPerfHUD I am bit reluctant to pay for such tools.

Doesn't ATI expose these counters in an instrumental OpenGL driver?

CrazyButcher
12-23-2007, 08:35 AM
I also would like to see some more "free" performance tools, maybe for the SDK group it would be an idea to expose those measuring tools, so that opensource tools such as glintercept could help us all. It's somewhat sad how "second choice" developing with opengl feels, when there is lots of stuff for free for Dx, and gdebugger feels extremely expensive. While of course developing such tools costs money, exposing counters and so on would be only fair to "do it yoursel" or / opensource tools...

zed
12-23-2007, 04:35 PM
>> One usefull counter which NVIDIA has is number of fragments killed by the zcull unit. Is it possible to read these counters and how?

u can implement this yourself with the stencil buffer, + draw the result onscreen with a color palette

rcpedersen
12-24-2007, 09:26 AM
u can implement this yourself with the stencil buffer, + draw the result onscreen with a color palette

And then read back the results and count fragments culled on CPU side ;-), sounds like I am reinventing the wheel in a very bad manner. Thats reading back all pixels, effectively stalling the pipeline instead of using an instrumental driver to query the zcull unit.

I have a background in DirectX where there are free tools made by Microsoft and NVIDIA, actually turns out ATI even has a few tools for debugging as well all free, but NO support for OpenGL.

With OpenGL I am stuck with reinventing the wheel once more?

I have thrown together a small sample that suits my needs using NVPerfSDK with one of the existing examples.
But there are two problems with that.
1) OpenGL is only support in a limited form compared to the amoun t of info you can get from the DirectX driver.
2) Seems like ATI doesnt expose anything at all.

Are the ARB board members working on developing OpenGL tools?

Also if gDEBugger can query ATI hardware under OpenGL how can others do this themselfs? Is this not exposed in the driver?
Its fine with me if its on Windows only just as long as it is exposed.

zed
12-24-2007, 01:35 PM
And then read back the results and count fragments culled on CPU side ;-), sounds like I am reinventing the wheel in a very bad manner. Thats reading back all pixels, effectively stalling the pipeline instead of using an instrumental driver to query the zcull unit.

i believe its prolly more flexible than what the tools offer
eg the same scene with overdraw visualized with A/ depthtest fail B/ depthtest pass
http://www.zedzeek.com/junk/overdraw.png

though i do agree with your complaint about the graphics companies

Timothy Farrar
12-24-2007, 02:04 PM
I've been waiting for NVidia's Perf Tools for Linux to be updated for the GeForce 8 series, perhaps some day. Should be great for OpenGL if it is ever finished.

You can use a opengl timer query on NVidia to get GPU time and profile that way (perhaps there is something similar for ATi?). However given that GPU is threaded, times can vary a little, but works well enough to find trends to optimize with.