Standard Error Information

Is the result always formatted the same way from GetInfoLog. I really need the line and row position where the actuall error occurs in a compilation

The contents of the InfoLog are implementation dependent.

But at least two implementations (ATI and 3DLabs) follow a convention of:

prefixstring:FILE:LINE:‘tokenstring’:messagestring

For example, a vertex shader of:

#error "This is a test"
void main ( void ) { gl_Position=ftransform(); }

infolog will contain:

ERROR: 0:1 '' : This is a test

-mr. bill

Ok. Thanx !

Have you seen what NVidia uses ?

What is FILE? Does it resolve to the shader object ID?

I really recomend you to use 3Dlabs GLSLvalidate tool, very handy (though locks file :frowning: ) & you can forget about runtime errorlogs.

GLSLValidate.exe also takes command line parameters.

You can use /v <vertex shader> or /f <fragment shader>

ex: ‘glslvalidate.exe /v shader.vert’

This will check the shader just like the GUI does, but instead of reporting the errors, it stores them all in log files.

They are vertex.log and fragment.log respectively.

Originally posted by Anitox:
[b]GLSLValidate.exe also takes command line parameters.

You can use /v <vertex shader> or /f <fragment shader>

ex: ‘glslvalidate.exe /v shader.vert’

This will check the shader just like the GUI does, but instead of reporting the errors, it stores them all in log files.

They are vertex.log and fragment.log respectively.[/b]
Right! Just to add to that, glslvalidate.exe will aso return error codes. Thus you could use it in a batch script, if you want.

Barthold

I am really looking for the runtime info as i want to validate if a certain script really is a glsl script or not.

Is there a BNF for GLSL ? or simillar

Is there a way to tell to tell if a shader run in HW7SW by a query to the shader…

Looks like nVidia’s InfoLog format is different from ATI & 3Dlabs. They put the line number within parenthesis at the beginning. eg,

(line number) : <error message>

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