You copied the Doc URL to your clipboard.

3.4. Shader syntax checking

If you do not have the Offline Compiler available, you can skip this section. For more information about the Offline Compiler, see Mali GPU Developer Tools Overview.

Each time a shader source file is saved, the Shader Development Studio compiles the shader in the background using the offline compiler. If any errors are found, error messages are displayed in:

  • Problems view.

  • Alongside the offending line of the shader source file, if it is open in the shader source editor.

To see how errors are displayed by Eclipse:

  1. Open the file simple.frag in the SimpleTest project.

  2. Remove the semi-colon at the end of the vec4 expression.

  3. Save the file.

    A red error marker is displayed on the line beneath the vec4 expression line. See Figure 3.21:

    Figure 3.21. Error indicator in shader source editor

    Error indicator in shader source editor

    Similar to a C compiler, the offline compiler reports a missing semicolon as an error on the next line.

    The removal of the semi-colon generates four separate error messages in the Problems view. See Figure 3.22:

    Figure 3.22. Errors in Problems view

    Errors in Problems view

  4. Replace the semi-colon and save the file.

    The source file is compiled in the background by the offline compiler, because there are no errors in the source code, the error marker is removed from the source editor and the error messages are removed from the Problems view.

Was this page helpful? Yes No