Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-12-28 17:30:43 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-12-28 17:42:37 +0300
commit1a246afe0330546a9fb526558d24b47c69e678d4 (patch)
tree77354c1e52b576dfa921bdbf88195eef0497cb63 /intern/cycles/render/svm.h
parentb26fb531f3699d384775703e7da7277a5b2eb1bd (diff)
Cycles: Use different approach for SVM summary report
Use Summary structure to collect all summary related on the shader compilation process which then could be either simply reported to the log or be passed to some user interface or so. This is type of the summary / report which is most flexible and useful and something we could use for other parts like shader optimization.
Diffstat (limited to 'intern/cycles/render/svm.h')
-rw-r--r--intern/cycles/render/svm.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h
index 02855f22fb3..bc641d2e00a 100644
--- a/intern/cycles/render/svm.h
+++ b/intern/cycles/render/svm.h
@@ -52,11 +52,27 @@ public:
class SVMCompiler {
public:
+ struct Summary {
+ Summary();
+
+ /* Number of SVM nodes shader was compiled into. */
+ int num_svm_nodes;
+
+ /* Peak stack usage during shader evaluation. */
+ int peak_stack_usage;
+
+ /* A full multiline description of the state of the compiler after
+ * compilation.
+ */
+ string full_report() const;
+ };
+
SVMCompiler(ShaderManager *shader_manager, ImageManager *image_manager);
void compile(Scene *scene,
Shader *shader,
vector<int4>& svm_nodes,
- int index);
+ int index,
+ Summary *summary = NULL);
void stack_assign(ShaderOutput *output);
void stack_assign(ShaderInput *input);