PDA

View Full Version : How do you know if a vertex program is executed in hardware?



EG
05-14-2004, 09:53 PM
How do you know if a vertex shader is executed in hardware?
On old hardware this will be obvious, but on new hardware, it could depend on what you have in the shader, how long it is, etc.
Is there a way to query the driver to know if the vertex program will be handled by the GPU or CPU?

boiler
05-14-2004, 10:04 PM
Hi!

Look at the glGetInfoLogARB function, it will give you a string with that information.

Greetings Mario

EG
05-15-2004, 12:40 AM
At which point does glGetInfoLogARB returns this information?
I tried querying after compiling, linking, validating or using, but I got either an error/warnings list or an empty string when there are no error/warnings... (nVidia 61 drivers)

Corrail
05-15-2004, 12:46 AM
The glGetInfoLog only works with ATI drivers. I don't know if and how it is possible on nVidia drivers.

[EDIT]
Of course the glGetInfoLog will work in nVidia too but there's no information if the shader runs in hardware or in software.

jeickmann
05-16-2004, 05:21 AM
I think another problem is, that the infolog's format is not standardized.
So you can only check at development time and not at runtime how a shader runs, because the log's format might have changed.

Jan

Ffelagund
05-16-2004, 08:34 AM
The nonstandar logs are a very annoying question, because for example, I must have specialized code for different glsl compilers, to parse the error lines in the Shader Designer, and carry the cursor to the right source file and line in the code.

EG
05-16-2004, 10:53 PM
Let's hope that some standardization will happen.

The error/warning lines formatting issues is going to be annoying too for shader designers, while it's quite a trivial matter in terms of standardization.