summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2020-12-04 14:10:15 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-07 17:52:00 +0000
commitcdc579c9f90758a20992484958dd1cb65ab26fdf (patch)
tree0f7999f41b1740a6dfe550e7032002e444f4a883
parent362271cc8ecd9fb003b63337bb06f221b29187b6 (diff)
QShaderProgramBuilder: add documentation related to caching
Change-Id: Icdab60d721a0a5186fe3e8844f40e2e448eb94d5 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit cf8688e0ab17f83ad2909431bfae7be209ba7155) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/render/materialsystem/qshaderprogrambuilder.cpp32
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