How do you know if a vertex program is executed in hardware?

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?

Hi!

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

Greetings Mario

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)

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.

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

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.

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.