nvidia GLSL compiler slow

Started by
4 comments, last by Eric Lengyel 18 years, 2 months ago
I use both ATI and nvidia cards, on my ATI card my 20 glsl shaders compile in less then 300 msec. But on my nvidia card over 5000 msec! This is too slow! One solution would be to pre compile all shaders but GLSL does not allow me to get the asm code for my shaders...right? I could compile them in an external compiler like cgc (or is there a better one?) but that’s feels like an ugly hack just because nvidia's compiler is not fast enough. This must be a very common problem so I wonder how other people have solved it...?
Advertisement
I for one have decided to stick with ASM because of that same mentioned slowness in loading GLSL shaders with NVIDIA cards.
Quote:Original post by JavaCoolDude
I for one have decided to stick with ASM because of that same mentioned slowness in loading GLSL shaders with NVIDIA cards.

The problem with that is that the ARB ASM extensions are deprecated, and will never be updated anymore. They currently expose only an old subset of the actual shader functionality the GPU provides. If you want to use the newer functions, you'll have to go vendor dependent, which is a very bad idea with shaders (because not only the shader management, but also your shader code becomes vendor dependent).

So ASM is no good alternative for GLSL, and it will get much worse in the future.
With regards to ASM:
No. The official ARB spec is fairly low, and will never be raised. NV provides their extensions, but ATI didn't bother. So as far as the future, you are stuck with high level stuff.

So as far as compiling, it strikes me as suspicious that the shader is taking 5 seconds to compile. I don't know what the problem could be, but I'm willing to bet that's not normal.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
IMO this is the number one problem on nvidia cards (and with glsl) not much u can do about it except for getting a better computer.
i've read d3d HLSL will use the same method as glsl in the future (driver compiling programs) which will most likely benifit both shading languages
It's unfortunate that ATI considers the assembly-like shaders to be a 'legacy' interface. Assembly has its place -- compilation speed being one, and an easier way to build shaders on the fly being another. Even now, Nvidia continues to support assembly, and they told me there will be an assembly interface for geometry shaders as well. I suspect that ATI's motivations are at least partly political because they don't want to be forced to support an interface that was originally an Nvidia design.

This topic is closed to new replies.

Advertisement