#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "angle_gl.h"
#include "common/debug.h"
#include "compiler/translator/Compiler.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/FindSymbolNode.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
#include "compiler/translator/util.h"
namespace sh
{
namespace
{
void AddArrayZeroInitSequence(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable);
void AddStructZeroInitSequence(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable);
TIntermBinary *CreateZeroInitAssignment(const TIntermTyped *initializedNode)
{ … }
void AddZeroInitSequence(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable)
{ … }
void AddStructZeroInitSequence(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable)
{ … }
void AddArrayZeroInitStatementList(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable)
{ … }
void AddArrayZeroInitForLoop(const TIntermTyped *initializedNode,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable)
{ … }
void AddArrayZeroInitSequence(const TIntermTyped *initializedNode,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initSequenceOut,
TSymbolTable *symbolTable)
{ … }
void InsertInitCode(TCompiler *compiler,
TIntermBlock *root,
const InitVariableList &variables,
TSymbolTable *symbolTable,
int shaderVersion,
const TExtensionBehavior &extensionBehavior,
bool canUseLoopsToInitialize,
bool highPrecisionSupported)
{ … }
class InitializeLocalsTraverser : public TIntermTraverser
{ … };
}
void CreateInitCode(const TIntermTyped *initializedSymbol,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TIntermSequence *initCode,
TSymbolTable *symbolTable)
{ … }
bool InitializeUninitializedLocals(TCompiler *compiler,
TIntermBlock *root,
int shaderVersion,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
TSymbolTable *symbolTable)
{ … }
bool InitializeVariables(TCompiler *compiler,
TIntermBlock *root,
const InitVariableList &vars,
TSymbolTable *symbolTable,
int shaderVersion,
const TExtensionBehavior &extensionBehavior,
bool canUseLoopsToInitialize,
bool highPrecisionSupported)
{ … }
}