-<HTML>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+ <title>Shading Language Support</title>
+ <link rel="stylesheet" type="text/css" href="mesa.css">
+</head>
+<body>
-<TITLE>Shading Language Support</TITLE>
-
-<link rel="stylesheet" type="text/css" href="mesa.css"></head>
-
-<BODY>
-
-<H1>Shading Language Support</H1>
+<h1>Shading Language Support</h1>
<p>
This page describes the features and status of Mesa's support for the
</p>
<ul>
<li><a href="#envvars">Environment variables</a>
-<li><a href="#120">GLSL 1.20 support</a>
+<li><a href="#glsl120">GLSL 1.20 support</a>
<li><a href="#unsup">Unsupported Features</a>
<li><a href="#notes">Implementation Notes</a>
<li><a href="#hints">Programming Hints</a>
</ul>
-
-<a name="envvars">
-<h2>Environment Variables</h2>
+<h2 id="envvars">Environment Variables</h2>
<p>
The <b>MESA_GLSL</b> environment variable can be set to a comma-separated
</p>
-<a name="120">
-<h2>GLSL Version</h2>
+<h2 id="glsl120">GLSL Version</h2>
<p>
The GLSL compiler currently supports version 1.20 of the shading language.
</ul>
-<a name="unsup">
-<h2>Unsupported Features</h2>
+<h2 id="unsup">Unsupported Features</h2>
<p>XXX update this section</p>
</p>
-<a name="notes">
-<h2>Implementation Notes</h2>
+<h2 id="notes">Implementation Notes</h2>
<ul>
<li>Shading language programs are compiled into low-level programs
</p>
-<a name="hints">
-<h2>Programming Hints</h2>
+<h2 id="hints">Programming Hints</h2>
<ul>
<li>Use the built-in library functions whenever possible.
</ul>
-<a name="standalone">
-<h2>Stand-alone GLSL Compiler</h2>
+<h2 id="standalone">Stand-alone GLSL Compiler</h2>
<p>
The stand-alone GLSL compiler program can be used to compile GLSL shaders
<p>
This tool is useful for:
-<p>
+</p>
<ul>
<li>Inspecting GPU code to gain insight into compilation
<li>Generating initial GPU code for subsequent hand-tuning
emit GL_ARB_vertex_program-style instructions:
</p>
<pre>
- src/glsl/glslcompiler --dump-ast myshader.vert
+ src/glsl/glsl_compiler --dump-ast myshader.vert
</pre>
Options include
</ul>
-
-
-<a name="implementation">
-<h2>Compiler Implementation</h2>
+<h2 id="implementation">Compiler Implementation</h2>
<p>
The source code for Mesa's shading language compiler is in the
};
</pre>
-<ul>
-<li>EmitHighLevelInstructions
-<br>
+<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.
-</li>
+</dd>
-<li>EmitCondCodes
-<br>
+<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.
-</li>
+</dd>
-<li>EmitComments
-<br>
+<dt>EmitComments</dt>
+<dd>
If set, instructions will be annoted with comments to help with debugging.
Extra NOP instructions will also be inserted.
-</br>
-
-</ul>
+</dd>
+</dl>
-<a name="validation">
-<h2>Compiler Validation</h2>
+<h2 id="validation">Compiler Validation</h2>
<p>
Developers working on the GLSL compiler should test frequently to avoid
</p>
<p>
-The <a href="http://people.freedesktop.org/~nh/piglit/">Piglit</a> project
+The <a href="http://people.freedesktop.org/~nh/piglit/" target="_parent">Piglit</a> project
has many GLSL tests and the
<a href="http://glean.sf.net" target="_parent">Glean</a> glsl1 test
tests GLSL features.
The Mesa demos repository also has some good GLSL tests.
</p>
-</BODY>
-</HTML>
+</body>
+</html>