diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2020-12-04 14:10:15 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2020-12-07 16:16:50 +0100 |
commit | cf8688e0ab17f83ad2909431bfae7be209ba7155 (patch) | |
tree | 5e41218b2bd93893f309e0997ac2099ba33d1a7f /src | |
parent | 3c57abc7b30edf7943648752201170cfce93582e (diff) |
QShaderProgramBuilder: add documentation related to caching
Change-Id: Icdab60d721a0a5186fe3e8844f40e2e448eb94d5
Pick-to: 6.0 5.15
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/render/materialsystem/qshaderprogrambuilder.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/render/materialsystem/qshaderprogrambuilder.cpp b/src/render/materialsystem/qshaderprogrambuilder.cpp index a52e3ddaa..ed08af56f 100644 --- a/src/render/materialsystem/qshaderprogrambuilder.cpp +++ b/src/render/materialsystem/qshaderprogrambuilder.cpp @@ -54,6 +54,22 @@ A shader program builder consists of several different shader graphs used to generate shader code. + + A cache of generated shader code is maintained. Generated shaders are by + defaults saved in + QStandardPaths::writableLocation(QStandardPaths::TempLocation)). This path + can be overridden by setting environment variable QT3D_WRITABLE_CACHE_PATH + to a valid writable path. + + The use of the cache can be disabled by setting environment variable + QT3D_DISABLE_SHADER_CACHE. + + In most cases, changes made to a graph are detected by Qt 3D and a new + cache entry will be generated. One case were this will not happen is when + code snippets included by a graphs are changed. To work around that, + clearing the cache directory or setting environment variable + QT3D_REBUILD_SHADER_CACHE can be used to force shader code to be generated + again. */ /*! @@ -65,6 +81,22 @@ A shader program builder consists of several different shader graphs used to generate shader code. + + A cache of generated shader code is maintained. Generated shaders are by + defaults saved in + QStandardPaths::writableLocation(QStandardPaths::TempLocation)). This path + can be overridden by setting environment variable QT3D_WRITABLE_CACHE_PATH + to a valid writable path. + + The use of the cache can be disabled by setting environment variable + QT3D_DISABLE_SHADER_CACHE. + + In most cases, changes made to a graph are detected by Qt 3D and a new + cache entry will be generated. One case were this will not happen is when + code snippets included by a graphs are changed. To work around that, + clearing the cache directory or setting environment variable + QT3D_REBUILD_SHADER_CACHE can be used to force shader code to be generated + again. */ QT_BEGIN_NAMESPACE |