diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2015-08-31 09:54:23 +0300 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2015-09-04 08:22:37 +0300 |
commit | 04e201d0c02cd30ace5c6fe80e9f021ebb733682 (patch) | |
tree | ffaa13fa4de05dc7fa01c09bdae21e816dff1ea1 /docs/shading.html | |
parent | 0db323a62481a57269a46287a64fa743756e80f3 (diff) | |
download | external_mesa3d-04e201d0c02cd30ace5c6fe80e9f021ebb733682.zip external_mesa3d-04e201d0c02cd30ace5c6fe80e9f021ebb733682.tar.gz external_mesa3d-04e201d0c02cd30ace5c6fe80e9f021ebb733682.tar.bz2 |
mesa: change 'SHADER_SUBST' facility to work with env variables
Patch modifies existing shader source and replace functionality to work
with environment variables rather than enable dumping on compile time.
Also instead of _mesa_str_checksum, _mesa_sha1_compute is used to avoid
collisions.
Functionality is controlled via two environment variables:
MESA_SHADER_DUMP_PATH - path where shader sources are dumped
MESA_SHADER_READ_PATH - path where replacement shaders are read
v2: cleanups, add strerror if fopen fails, put all functionality
inside HAVE_SHA1 since sha1 is required
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Suggested-by: Eero Tamminen <eero.t.tamminen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'docs/shading.html')
-rw-r--r-- | docs/shading.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/shading.html b/docs/shading.html index 77a0ee4..e9fe3dd 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -63,6 +63,20 @@ execution. These are generally used for debugging. Example: export MESA_GLSL=dump,nopt </p> +<p> +Shaders can be dumped and replaced on runtime for debugging purposes. Mesa +needs to be configured with '--with-sha1' to enable this functionality. This +feature is not currently supported by SCons build. + +This is controlled via following environment variables: +<ul> +<li><b>MESA_SHADER_DUMP_PATH</b> - path where shader sources are dumped +<li><b>MESA_SHADER_READ_PATH</b> - path where replacement shaders are read +</ul> +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. +</p> <h2 id="support">GLSL Version</h2> |