Suggested Tools for ARB?

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?

There is a Designer out there:
www.typhoonlabs.com

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

rya.
Scorcher24

Originally posted by pha3z:
[b]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?[/b]
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.

Yes this helps!

But the www.typhoonlabs.com site does not come up for me. It hasn’t for two days. Does my DNS suck or something?

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 :-).

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