PDA

View Full Version : Suggested Tools for ARB?



pha3z
08-27-2005, 06:39 PM
I'm writing ARB vertex and pixel shaders for doom3 engine. I'm wondering if there are any tools to give me performance information on my shaders? Or even a preview tool that would let me pass parameters to the shader and see a realtime preview when I'm editing.

Performance-wise, at the very least I want a way to know how many clock cycles any given Instruction takes. At least that way I could try to build instruction sequeqnces that use minimal cycles. Are there some charts out there somewhere?

DieselGL
08-28-2005, 03:20 AM
There is a Designer out there:
www.typhoonlabs.com (http://www.typhoonlabs.com)

I have written one by mymself, It is not finished, but basics are already working. If you want it, mail me. :)

rya.
Scorcher24

V-man
08-28-2005, 04:21 AM
Originally posted by pha3z:
I'm writing ARB vertex and pixel shaders for doom3 engine. I'm wondering if there are any tools to give me performance information on my shaders? Or even a preview tool that would let me pass parameters to the shader and see a realtime preview when I'm editing.

Performance-wise, at the very least I want a way to know how many clock cycles any given Instruction takes. At least that way I could try to build instruction sequeqnces that use minimal cycles. Are there some charts out there somewhere?Nvidia has a performance analysis tool
(NVperfkit) and also their fxcomposer can give you info on your shaders but I don't know if it supports GL yet. Last time I checked, it didn't.

Clock-cycles:
Most of the instruction, either vp or fp, consume 1 cycle. There isn't a specific document about this kind of info.

There are documents from ATI and NV that give performance tips like ATI tends to prefer texture fetchs at the beginning and NV doesn't care much.
It's a good idea to "insert" a non dependent instruction between other dependent ones to keep latency down, very much like cpu assembly programming.

Hope that helps.

pha3z
08-28-2005, 09:32 AM
Yes this helps!

But the www.typhoonlabs.com (http://www.typhoonlabs.com) site does not come up for me. It hasn't for two days. Does my DNS suck or something?

Hlz
08-28-2005, 10:44 AM
You may also want to have a look at NVShaderPerf.
(Supports chips back to NV30, and reports cycle counts.)

Dunno what's up with that site. I get static too. Probably remodelling :-).

V-man
08-29-2005, 05:59 AM
The typhoon labs product is for GLSL and it didn't have performance analysis tools.
It's basically a tool for creating shaders like RenderMonkey (http://www.ati.com/developer/rendermonkey/index.html).
but RM also doesn't support the asm shaders, only GLSL.

You could always write in GLSL and use Cg 1.3 to compile it to NV and ARB asm shaders.
It's also possible to install NV drivers, get NVemulate and turn on "dump shader" feature.

NV drivers have Cg built in. They will optimize for NV by default but there is some flag to prefer temp register usage, which is better for ATI.

There are other things like ATI prefers ALU instructions to texture fetches. Someone named Humus made a change to Doom3 shader that gave it a good boost on ATI hw.
http://www.google.com/custom?q=Doom3%2BA...ww.beyond3d.com (http://www.google.com/custom?q=Doom3%2BATI&sa.x=0&sa.y=0&cof=LW%3A155%3BL%3Ahttp%3A%2F%2Fwww.beyond3d.com%2 Fsiteimages%2Flogo_small.gif%3BLH%3A102%3BAH%3Alef t%3BS%3Ahttp%3A%2F%2Fwww.beyond3d.com%3BAWFID%3A81 a60a7efa3ebe5c%3B&domains=www.beyond3d.com&sitesearch=www.beyond3d.com)