st/va Avoid VBR bitrate calculation overflow v2
[mesa.git] / docs / shading.html
index 19e20b183b63fa262930a1d8b453c8a7c23b5baa..cf989ce9029a6a420ef55f94419d7ec37b8c165d 100644 (file)
@@ -63,11 +63,25 @@ execution.  These are generally used for debugging.
 Example:  export MESA_GLSL=dump,nopt
 </p>
 
+<p>
+Shaders can be dumped and replaced on runtime for debugging purposes. Mesa 
+needs to be configured with '--with-sha1' to enable this functionality. This 
+feature is not currently supported by SCons build.
+
+This is controlled via following environment variables:
+<ul>
+<li><b>MESA_SHADER_DUMP_PATH</b> - path where shader sources are dumped
+<li><b>MESA_SHADER_READ_PATH</b> - path where replacement shaders are read
+</ul>
+Note, path set must exist before running for dumping or replacing to work. 
+When both are set, these paths should be different so the dumped shaders do 
+not clobber the replacement shaders.
+</p>
 
 <h2 id="support">GLSL Version</h2>
 
 <p>
-The GLSL compiler currently supports version 1.40 of the shading language.
+The GLSL compiler currently supports version 3.30 of the shading language.
 </p>
 
 <p>
@@ -195,51 +209,6 @@ The final vertex and fragment programs may be interpreted in software
 (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 annoted with comments to help with debugging.
-Extra NOP instructions will also be inserted.
-</dd>
-</dl>
-
-
 <h2 id="validation">Compiler Validation</h2>
 
 <p>