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:
Diffstat (limited to 'intern/cycles/render/svm.h')
-rw-r--r--intern/cycles/render/svm.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/intern/cycles/render/svm.h b/intern/cycles/render/svm.h
index 05fb85b057f..dfd78cf3c40 100644
--- a/intern/cycles/render/svm.h
+++ b/intern/cycles/render/svm.h
@@ -78,6 +78,27 @@ public:
protected:
struct Stack {
Stack() { memset(users, 0, sizeof(users)); }
+ Stack(const Stack& other) { memcpy(users, other.users, sizeof(users)); }
+ Stack& operator=(const Stack& other) { memcpy(users, other.users, sizeof(users)); return *this; }
+
+ bool empty()
+ {
+ for(int i = 0; i < SVM_STACK_SIZE; i++)
+ if(users[i])
+ return false;
+
+ return true;
+ }
+
+ void print()
+ {
+ printf("stack <");
+
+ for(int i = 0; i < SVM_STACK_SIZE; i++)
+ printf((users[i])? "*": " ");
+
+ printf(">\n");
+ }
int users[SVM_STACK_SIZE];
};