Set correct symbol ids when referring to GLSL built-ins
The symbol ids are fetched from the symbol table. A new utility
function is added to make this more convenient.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I780430e3386f6599503d8290c568ca9bc9cad147
Reviewed-on: https://chromium-review.googlesource.com/559535
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/InitializeVariables.h b/src/compiler/translator/InitializeVariables.h
index cc6a7ae..536d0cc 100644
--- a/src/compiler/translator/InitializeVariables.h
+++ b/src/compiler/translator/InitializeVariables.h
@@ -20,7 +20,7 @@
// Return a sequence of assignment operations to initialize "initializedSymbol". initializedSymbol
// may be an array, struct or any combination of these, as long as it contains only basic types.
-TIntermSequence *CreateInitCode(const TIntermSymbol *initializedSymbol);
+TIntermSequence *CreateInitCode(const TIntermTyped *initializedSymbol);
// Initialize all uninitialized local variables, so that undefined behavior is avoided.
void InitializeUninitializedLocals(TIntermBlock *root, int shaderVersion);
@@ -32,12 +32,11 @@
// 2. Initializing output variables referred to in the shader source.
// Note: The type of each lvalue in an initializer is retrieved from the symbol table. gl_FragData
// requires special handling because the number of indices which can be initialized is determined by
-// the API spec and extension support.
+// enabled extensions.
void InitializeVariables(TIntermBlock *root,
const InitVariableList &vars,
const TSymbolTable &symbolTable,
int shaderVersion,
- ShShaderSpec shaderSpec,
const TExtensionBehavior &extensionBehavior);
} // namespace sh