Hash :
9cbc07c3
Author :
Date :
2017-05-10T18:22:01
Simplify AST transformations that need to find main Share code for finding the main function from the AST between InitializeVariables, DeferGlobalInitializers, EmulateGLFragColorBroadcast and UseInterfaceBlockFields. This makes InitializeVariables simpler in particular, as it doesn't need an AST traverser anymore. BUG=angleproject:2033 TEST=angle_unittests, WebGL conformance tests Change-Id: I14c994bbde58a904f6684d2f0b72bd8004f70902 Reviewed-on: https://chromium-review.googlesource.com/501166 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// UseInterfaceBlockFields.h: insert statements to reference all members in InterfaceBlock list at
// the beginning of main. This is to work around a Mac driver that treats unused standard/shared
// uniform blocks as inactive.
#ifndef COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
#define COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
#include <GLSLANG/ShaderLang.h>
namespace sh
{
class TIntermBlock;
class TSymbolTable;
using InterfaceBlockList = std::vector<sh::InterfaceBlock>;
void UseInterfaceBlockFields(TIntermBlock *root,
const InterfaceBlockList &blocks,
const TSymbolTable &symbolTable);
} // namespace sh
#endif // COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_