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
commita0b265b1708cdd652c1c2e7f25dfb6b491554937 (patch)
treef57c9eba97c084e8f08ec6275e922f85f194a3e6
parent5de8f136cedee0fe4ad9f3caa31be8f7a06cb085 (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 7f98fbf5e..5530db2ee 100644
--- a/src/render/materialsystem/qshaderprogrambuilder.cpp
+++ b/src/render/materialsystem/qshaderprogrambuilder.cpp
@@ -56,6 +56,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.
*/
/*!
@@ -67,6 +83,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