Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(847)

Unified Diff: src/compiler/ParseHelper.cpp

Issue 9827044: Added support for EXT_frag_depth (Closed) Base URL: http://angleproject.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ParseHelper.h ('k') | src/compiler/ShaderLang.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ParseHelper.cpp
===================================================================
--- src/compiler/ParseHelper.cpp (revision 2247)
+++ src/compiler/ParseHelper.cpp (working copy)
@@ -925,6 +925,27 @@
return static_cast<const TFunction*>(symbol);
}
+bool TParseContext::isVariableBuiltIn(const TVariable* var)
+{
+ bool builtIn = false;
+ // First find by unmangled name to check whether the function name has been
+ // hidden by a variable name or struct typename.
+ const TSymbol* symbol = symbolTable.find(var->getName(), &builtIn);
+ if (symbol == 0) {
+ symbol = symbolTable.find(var->getMangledName(), &builtIn);
+ }
+
+ if (symbol == 0) {
+ return false;
+ }
+
+ if (!symbol->isVariable()) {
+ return false;
+ }
+
+ return builtIn;
+}
+
//
// Initializers show up in several places in the grammar. Have one set of
// code to handle them here.
« no previous file with comments | « src/compiler/ParseHelper.h ('k') | src/compiler/ShaderLang.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b