Farcry is low efficiency because of Cg Compiler

Tridam said:
I mean shaders are sent to the GPU when they are used and I presume that this is done per object. If you use different walking way when capturing shaders you'll introduce a difference in the captured shaders file.

Moreover the same shader is sent more than once.

So I think that you should try to use the same walking way to capture the shaders and you shouldn't count the shaders but uniquely the different ones.
Shaders are not sent from the app to the driver when they are used. This only happens when they are created. When they are used, the app selects the shader by its handle and the driver then updates the HW state appropriately.
 
I was eating myself, but i remained clean :)

Back on topic, are all driver/gpu handling shader upload the same way like OpenGL Guy suggested ?
 
Sorry, it was late, I meant "I was eating [and not drinking]"

Doh ! :oops:

Note : Hannibal doesn't eat himself, he just cut his hand in "Hannibal"....
 
Magic-Sim said:
Back on topic, are all driver/gpu handling shader upload the same way like OpenGL Guy suggested ?

It's up to the app to decide when to send the shader to the runtime. So basically we can expect that the app will send it beforehand. Some apps decide to do a late binding of ressource (which is generally bad), but it's their design choice, nothing a driver can really do about it. Same for vertex buffers, texture creation etc..

If your question was for the way the driver interact with the GPU it's way too specific to be answered here.

LeGreg
 
LeGreg said:
Magic-Sim said:
Back on topic, are all driver/gpu handling shader upload the same way like OpenGL Guy suggested ?
It's up to the app to decide when to send the shader to the runtime. So basically we can expect that the app will send it beforehand. Some apps decide to do a late binding of ressource (which is generally bad), but it's their design choice, nothing a driver can really do about it. Same for vertex buffers, texture creation etc..
Right, but in the case of the shader, you only need to create it once, after that you are just binding a handle. If an app creates the same shader over and over, then obviously it's a poorly written app.
 
OpenGL guy said:
If an app creates the same shader over and over, then obviously it's a poorly written app.
It seems that farcry (or at least the demo/beta) is working this way...
 
I've looked into the logs produced by the beta v2a, it seems like they are constructed/parsed/compiled during level loading.
 
OpenGL guy said:
LeGreg said:
Magic-Sim said:
Back on topic, are all driver/gpu handling shader upload the same way like OpenGL Guy suggested ?
It's up to the app to decide when to send the shader to the runtime. So basically we can expect that the app will send it beforehand. Some apps decide to do a late binding of ressource (which is generally bad), but it's their design choice, nothing a driver can really do about it. Same for vertex buffers, texture creation etc..
Right, but in the case of the shader, you only need to create it once, after that you are just binding a handle. If an app creates the same shader over and over, then obviously it's a poorly written app.
At last - a justification for pre-compiled shaders. :) Since the driver would have to generate a hash value from the shader, that could also be used to save duplication :)
 
Back
Top