PDA

View Full Version : Standard Error Information



ToolTech
04-23-2004, 04:55 AM
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

mrbill
04-23-2004, 05:24 AM
The contents of the InfoLog are implementation dependent.

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

prefixstring:__FILE__:__LINE__:'tokenstring':messa gestring

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

ToolTech
04-23-2004, 05:34 AM
Ok. Thanx !

Have you seen what NVidia uses ?

Hampel
04-23-2004, 05:55 AM
What is __FILE__? Does it resolve to the shader object ID?

M/\dm/\n
04-23-2004, 06:14 AM
I really recomend you to use 3Dlabs GLSLvalidate tool, very handy (though locks file :( ) & you can forget about runtime errorlogs.

Anitox
04-23-2004, 07:40 AM
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.

barthold
04-23-2004, 11:37 AM
Originally posted by Anitox:
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.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

ToolTech
04-25-2004, 11:20 PM
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

ToolTech
04-25-2004, 11:41 PM
Is there a way to tell to tell if a shader run in HW7SW by a query to the shader..

friendly_philip
08-23-2005, 07:07 AM
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>