Sign in to follow this  

nvidia GLSL compiler slow

This topic is 4341 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4341 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this