View Full Version : loading glsl programs faster
my app is nearly using 200 programs which is the major slowdown in program startup
basically is there any way i can save the compiled results on disk and just read those back, it doesnt matter if it will only be valid for my card/driver.
i did hear of something along these lines, any news?
04-26-2005, 11:54 AM
Nope, right now there is no way of doing that. But the OpenGL ARB knows about that fact and it is/was discussed in the meetings.
04-26-2005, 05:31 PM
I haven't tried this. But maybe it is faster. Using low-level shading language and a Cg pre-compiler. You don't need to use Cg language, the new cgc.exe have an option that can comiple GLSL shaders into ARBvp and ARBfp codes.
04-27-2005, 03:33 AM
Originally posted by N64Marin:
I haven't tried this. But maybe it is faster. Using low-level shading language and a Cg pre-compiler. You don't need to use Cg language, the new cgc.exe have an option that can comiple GLSL shaders into ARBvp and ARBfp codes.Yes, you can do it, but it is bad approach. CG compiler are not updated frequently, so you can miss some SM3.0 feature because of old compiler. Just stick with driver one and take a beer on each app startup... until ARB or NVIDIA fix this mess.
cgc in driver (FW 76.91): 1.3.0001, build date Apr 15 2005 17:34:42
cgc installed on my machine: 1.3.0001, build date Aug 4 2004 10:01:10
Using low-level shading language and a Cg pre-compiler. You don't need to use Cg language, the new cgc.exe have an option that can comiple GLSL shaders into ARBvp and ARBfp codesthis sounds like a reasonable option, any further info. so does it do something like this,
load a glsl program, compile it and then save the output as say a *.vp program and then in my app i just load the *.vp program.
btw this is only for my own personal use to speedup my deveopment time, ie the final version wont include this
04-28-2005, 12:16 PM
hmm.. how long compilation time do you have with those 200 shaders? from my experience it's something like 0.3s per shader which seems pretty unbearable with 200. We had to change the shader system to compile the shaders on the fly when actually used instead of making all the combinations at startup. But still getting those half a second hickups in the beginning isn't really usable for release either.
On the ATI drivers it takes no time, which is more reasonable considering the small source sizes - I suspect nvidia loading up the whole cgc.exe process every time a compilation is needed or something...
i have an athlon64 2.0ghz
0.3secs seems quite long. just timed my shaders they range from 0.075 -> 0.14 secs.
a full compile of my app takes more than a minute so im wasting time waiting anyways, shudders to think what thatll be on my last computer (celeron433mhz)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.