<p>
This page describes the features and status of Mesa's support for the
-<a href="http://opengl.org/documentation/glsl/">
+<a href="https://opengl.org/documentation/glsl/">
OpenGL Shading Language</a>.
</p>
<li><b>log</b> - log all GLSL shaders to files.
The filenames will be "shader_X.vert" or "shader_X.frag" where X
the shader ID.
-<li><b>nopt</b> - disable compiler optimizations
-<li><b>opt</b> - force compiler optimizations
+<li><b>cache_info</b> - print debug information about shader cache
+<li><b>cache_fb</b> - force cached shaders to be ignored and do a full
+ recompile via the fallback path</li>
<li><b>uniform</b> - print message to stdout when glUniform is called
<li><b>nopvert</b> - force vertex shaders to be a simple shader that just transforms
the vertex position with ftransform() and passes through the color and
</ul>
<p>
-After building Mesa, the compiler can be found at src/glsl/glsl_compiler
+After building Mesa, the compiler can be found at src/compiler/glsl/glsl_compiler
</p>
<p>
emit GL_ARB_vertex_program-style instructions:
</p>
<pre>
- src/glsl/glsl_compiler --dump-ast myshader.vert
+ src/compiler/glsl/glsl_compiler --version XXX --dump-ast myshader.vert
</pre>
Options include
<li><b>--dump-ast</b> - dump GPU code
<li><b>--dump-hir</b> - dump high-level IR code
<li><b>--dump-lir</b> - dump low-level IR code
-<li><b>--link</b> - ???
+<li><b>--dump-builder</b> - dump GLSL IR code
+<li><b>--link</b> - link shaders
+<li><b>--just-log</b> - display only shader / linker info if exist,
+without any header or separator
+<li><b>--version</b> - [Mandatory] define the GLSL version to use
</ul>
<p>
The source code for Mesa's shading language compiler is in the
-<code>src/glsl/</code> directory.
+<code>src/compiler/glsl/</code> directory.
</p>
<p>
(see drivers/dri/i915/i915_fragprog.c for example).
</p>
-<h3>Code Generation Options</h3>
-
-<p>
-Internally, there are several options that control the compiler's code
-generation and instruction selection.
-These options are seen in the gl_shader_state struct and may be set
-by the device driver to indicate its preferences:
-
-<pre>
-struct gl_shader_state
-{
- ...
- /** Driver-selectable options: */
- GLboolean EmitHighLevelInstructions;
- GLboolean EmitCondCodes;
- GLboolean EmitComments;
-};
-</pre>
-
-<dl>
-<dt>EmitHighLevelInstructions</dt>
-<dd>
-This option controls instruction selection for loops and conditionals.
-If the option is set high-level IF/ELSE/ENDIF, LOOP/ENDLOOP, CONT/BRK
-instructions will be emitted.
-Otherwise, those constructs will be implemented with BRA instructions.
-</dd>
-
-<dt>EmitCondCodes</dt>
-<dd>
-If set, condition codes (ala GL_NV_fragment_program) will be used for
-branching and looping.
-Otherwise, ordinary registers will be used (the IF instruction will
-examine the first operand's X component and do the if-part if non-zero).
-This option is only relevant if EmitHighLevelInstructions is set.
-</dd>
-
-<dt>EmitComments</dt>
-<dd>
-If set, instructions will be annotated with comments to help with debugging.
-Extra NOP instructions will also be inserted.
-</dd>
-</dl>
-
-
<h2 id="validation">Compiler Validation</h2>
<p>
</p>
<p>
-The <a href="http://piglit.freedesktop.org/">Piglit</a> project
+The <a href="https://piglit.freedesktop.org/">Piglit</a> project
has many GLSL tests.
</p>