X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fshading.html;h=839a61a0361380dd00ff829aafe23e9f97f53b42;hb=3a9b7692f1aecad3947fd2d4f8c3d2a947a16335;hp=96060f1a752f475c95619f992f3a1183b3b9acfc;hpb=85fb3e402744bbfd67ca9c79c98f54dd8ad169f5;p=mesa.git diff --git a/docs/shading.html b/docs/shading.html index 96060f1a752..839a61a0361 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -1,29 +1,33 @@ - + + + + + Shading Language + + + -Shading Language Support +
+ The Mesa 3D Graphics Library +
- + +
- - -

Shading Language Support

+

Shading Language

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

-

-Last updated on 15 December 2008. -

-

Contents

- - -

Environment Variables

+

Environment Variables

The MESA_GLSL environment variable can be set to a comma-separated @@ -43,48 +45,75 @@ list of keywords to control some aspects of the GLSL compiler and shader execution. These are generally used for debugging.

Example: export MESA_GLSL=dump,nopt

+

Experimenting with Shader Replacements

+

+Shaders can be dumped and replaced on runtime for debugging purposes. This +feature is not currently supported by SCons build. + +This is controlled via following environment variables: +

+ +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. Also, the filenames of the replacement shaders +should match the filenames of the corresponding dumped shaders. + +

Capturing Shaders

+ +

+Setting MESA_SHADER_CAPTURE_PATH to a directory will cause the compiler +to write .shader_test files for use with +shader-db, a tool +which compiler developers can use to gather statistics about shaders +(instructions, cycles, memory accesses, and so on). +

+

+Notably, this captures linked GLSL shaders - with all stages together - +as well as ARB programs. +

+ +

GLSL Version

- -

GLSL 1.20 support

+

+The GLSL compiler currently supports version 3.30 of the shading language. +

-GLSL version 1.20 is supported in Mesa 7.3 and later. -Among the features/differences of GLSL 1.20 are: +Several GLSL extensions are also supported: +

+

Unsupported Features

-
-

Unsupported Features

+

XXX update this section

The following features of the shading language are not yet fully supported @@ -95,7 +124,6 @@ in Mesa:

  • Linking of multiple shaders does not always work. Currently, linking is implemented through shader concatenation and re-compiling. This doesn't always work because of some #pragma and preprocessor issues. -
  • gl_ClipVertex
  • The gl_Color and gl_SecondaryColor varying vars are interpolated without perspective correction @@ -105,8 +133,7 @@ All other major features of the shading language should function.

    -
    -

    Implementation Notes

    +

    Implementation Notes

  • + +