X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fshading.html;h=a0bbe997c1b8eeea572fa16260b4af329689cb9c;hb=fbe01625f6bf2cef6742e1ff0d3d44a2afec003e;hp=a12487bb86c7fee801ec865ab4f41aab13e18d99;hpb=a73c59b7a6f45aeca32134873f893af178b354b8;p=mesa.git diff --git a/docs/shading.html b/docs/shading.html index a12487bb86c..a0bbe997c1b 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -18,7 +18,7 @@

This page describes the features and status of Mesa's support for the - + OpenGL Shading Language.

@@ -27,7 +27,7 @@ Contents

@@ -160,7 +188,7 @@ This tool is useful for:

-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

@@ -168,7 +196,7 @@ Here's an example of using the compiler to compile a vertex shader and emit GL_ARB_vertex_program-style instructions:

-    src/glsl/glsl_compiler --dump-ast myshader.vert
+    src/compiler/glsl/glsl_compiler --version XXX --dump-ast myshader.vert
 
Options include @@ -176,7 +204,11 @@ Options include
  • --dump-ast - dump GPU code
  • --dump-hir - dump high-level IR code
  • --dump-lir - dump low-level IR code -
  • --link - ??? +
  • --dump-builder - dump GLSL IR code +
  • --link - link shaders +
  • --just-log - display only shader / linker info if exist, +without any header or separator +
  • --version - [Mandatory] define the GLSL version to use @@ -184,7 +216,7 @@ Options include

    The source code for Mesa's shading language compiler is in the -src/glsl/ directory. +src/compiler/glsl/ directory.

    @@ -197,51 +229,6 @@ The final vertex and fragment programs may be interpreted in software (see drivers/dri/i915/i915_fragprog.c for example).

    -

    Code Generation Options

    - -

    -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: - -

    -struct gl_shader_state
    -{
    -   ...
    -   /** Driver-selectable options: */
    -   GLboolean EmitHighLevelInstructions;
    -   GLboolean EmitCondCodes;
    -   GLboolean EmitComments;
    -};
    -
    - -
    -
    EmitHighLevelInstructions
    -
    -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. -
    - -
    EmitCondCodes
    -
    -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. -
    - -
    EmitComments
    -
    -If set, instructions will be annoted with comments to help with debugging. -Extra NOP instructions will also be inserted. -
    -
    - -

    Compiler Validation

    @@ -250,9 +237,8 @@ regressions.

    -The Piglit project -has many GLSL tests and the -Glean glsl1 test tests GLSL features. +The Piglit project +has many GLSL tests.