From 61d31ae10daf3a59ccbf9bcc4cda3ca4fdd195aa Mon Sep 17 00:00:00 2001
From: Brian
-Last updated on 20 Jan 2007. +Last updated on 17 Feb 2007.
++Contents +
+ + + +@@ -41,6 +53,7 @@ All other major features of the shading language should function.
++A unique stand-alone GLSL compiler driver has been added to Mesa. +
+ +
+The stand-alone compiler (like a conventional command-line compiler) +is a tool that accepts Shading Language programs and emits low-level +GPU programs. +
+ ++This tool is useful for: +
+
+(compiler build instructions TBD) +
+ ++Here's an example of using the compiler to compile a vertex shader and +emit GL_ARB_vertex_program-style instructions: +
++ glslcompiler --arb --linenumbers --vs vertshader.txt ++
+The output may look similar to this: +
++!!ARBvp1.0 + 0: MOV result.texcoord[0], vertex.texcoord[0]; + 1: DP4 temp0.x, state.matrix.mvp.row[0], vertex.position; + 2: DP4 temp0.y, state.matrix.mvp.row[1], vertex.position; + 3: DP4 temp0.z, state.matrix.mvp.row[2], vertex.position; + 4: DP4 temp0.w, state.matrix.mvp.row[3], vertex.position; + 5: MOV result.position, temp0; + 6: END ++ +
+Note that some shading language constructs (such as uniform and varying +variables) aren't expressible in ARB or NV-style programs. +Therefore, the resulting output is not always legal by definition of +those program languages. +
++Also note that this compiler driver is still under development. +Over time, the correctness of the GPU programs, with respect to the ARB +and NV languagues, should improve. +
+