1 // 2 // Copyright 2020 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 #ifndef COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ 8 #define COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ 9 10 #include "common/angleutils.h" 11 #include "compiler/translator/Compiler.h" 12 #include "compiler/translator/TranslatorMetalDirect/ProgramPrelude.h" 13 #include "compiler/translator/TranslatorMetalDirect/SymbolEnv.h" 14 15 namespace sh 16 { 17 18 // Does a toposort on structs based on type dependencies. 19 // Struct type declarations are moved to the top of the root block. 20 ANGLE_NO_DISCARD bool ToposortStructs(TCompiler &compiler, 21 SymbolEnv &symbolEnv, 22 TIntermBlock &root, 23 ProgramPreludeConfig &ppc); 24 25 } // namespace sh 26 27 #endif // COMPILER_TRANSLATOR_TRANSLATORMETALDIRECT_TOPOSORTSTRUCTS_H_ 28