aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJamie Madill <jmadill@transgaming.com>2013-07-08 13:31:38 -0400
committerShannon Woods <shannonwoods@chromium.org>2013-07-19 18:06:52 -0400
commiteb1a010f0f996b3742fd34b92ffaf9014c943528 (patch)
tree26f931683608d126e7364fc8b23fa7fb49becae4 /include
parent94bf7f228d5a2f153ae9cb808f65ef9fbaa4005f (diff)
downloadangle-eb1a010f0f996b3742fd34b92ffaf9014c943528.tar.gz
Add expression complexity and call stack depth limits.
git-svn-id: https://angleproject.googlecode.com/svn/trunk@2242 736b8ea6-26fd-11df-bfd4-992fa37f6226 TRAC #23333 Authored-by: gman@chromium.org Signed-off-by: Shannon Woods Signed-off-by Nicolas Capens Merged-by: Jamie Madill Conflicts: src/common/version.h
Diffstat (limited to 'include')
-rw-r--r--include/GLSLANG/ShaderLang.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h
index ca8b448e..f86b4815 100644
--- a/include/GLSLANG/ShaderLang.h
+++ b/include/GLSLANG/ShaderLang.h
@@ -186,7 +186,13 @@ typedef enum {
// vec234, or mat234 type. The ShArrayIndexClampingStrategy enum,
// specified in the ShBuiltInResources when constructing the
// compiler, selects the strategy for the clamping implementation.
- SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000
+ SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000,
+
+ // This flag limits the complexity of an expression.
+ SH_LIMIT_EXPRESSION_COMPLEXITY = 0x2000,
+
+ // This flag limits the depth of the call stack.
+ SH_LIMIT_CALL_STACK_DEPTH = 0x4000,
} ShCompileOptions;
// Defines alternate strategies for implementing array index clamping.
@@ -255,6 +261,12 @@ typedef struct
// Selects a strategy to use when implementing array index clamping.
// Default is SH_CLAMP_WITH_CLAMP_INTRINSIC.
ShArrayIndexClampingStrategy ArrayIndexClampingStrategy;
+
+ // The maximum complexity an expression can be.
+ int MaxExpressionComplexity;
+
+ // The maximum depth a call stack can be.
+ int MaxCallStackDepth;
} ShBuiltInResources;
//