X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=docs%2Fshading.html;h=839a61a0361380dd00ff829aafe23e9f97f53b42;hb=3bca0af25dbf6d6b162463138100abb20bc1a1cc;hp=cd01af00d90444c164413bb87bc3cad6512a18da;hpb=2caa3aa1f4fed5fd336dbbdb77eeb2e29730a204;p=mesa.git diff --git a/docs/shading.html b/docs/shading.html index cd01af00d90..839a61a0361 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -2,19 +2,19 @@ - Shading Language Support + Shading Language
-

The Mesa 3D Graphics Library

+ The Mesa 3D Graphics Library
-

Shading Language Support

+

Shading Language

This page describes the features and status of Mesa's support for the @@ -50,7 +50,8 @@ execution. These are generally used for debugging. The filenames will be "shader_X.vert" or "shader_X.frag" where X the shader ID.

  • cache_info - print debug information about shader cache -
  • opt - force compiler optimizations +
  • cache_fb - force cached shaders to be ignored and do a full + recompile via the fallback path
  • uniform - print message to stdout when glUniform is called
  • nopvert - force vertex shaders to be a simple shader that just transforms the vertex position with ftransform() and passes through the color and @@ -58,24 +59,40 @@ execution. These are generally used for debugging.
  • nopfrag - force fragment shader to be a simple shader that passes through the color attribute.
  • useprog - log glUseProgram calls to stderr +
  • errors - GLSL compilation and link errors will be reported to stderr.

    Example: export MESA_GLSL=dump,nopt

    +

    Experimenting with Shader Replacements

    -Shaders can be dumped and replaced on runtime for debugging purposes. Mesa -needs to be configured with '--with-sha1' to enable this functionality. This +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. +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