Analyze the shader for define instructions.
This eliminates the need to specify if shaders can contain defined
constant values in the front-end using a global variable.
Change-Id: If7802a2743c0afa650a2631cd7945c8b3d7cf645
Reviewed-on: https://swiftshader-review.googlesource.com/3152
Reviewed-by: Greg Hartman <ghartman@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/Shader.hpp b/src/Shader/Shader.hpp
index 8c4fe3d..d4fd609 100644
--- a/src/Shader/Shader.hpp
+++ b/src/Shader/Shader.hpp
@@ -519,6 +519,7 @@
bool containsBreakInstruction() const;
bool containsContinueInstruction() const;
bool containsLeaveInstruction() const;
+ bool containsDefineInstruction() const;
bool usesSampler(int i) const;
struct Semantic
@@ -593,6 +594,7 @@
bool containsBreak;
bool containsContinue;
bool containsLeave;
+ bool containsDefine;
};
}