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 // RecordUniformBlocksWithLargeArrayMember.h: 7 // Collect all uniform blocks which have one or more large array members, 8 // and the array sizes are greater than or equal to 50. If some of them 9 // satify some conditions, we will translate them to StructuredBuffers 10 // on Direct3D backend. 11 // 12 13 #ifndef COMPILER_TRANSLATOR_TREEOPS_HLSL_RECORDUNIFORMBLOCKSWITHLARGEARRAYMEMBER_H_ 14 #define COMPILER_TRANSLATOR_TREEOPS_HLSL_RECORDUNIFORMBLOCKSWITHLARGEARRAYMEMBER_H_ 15 16 #include "compiler/translator/IntermNode.h" 17 18 namespace sh 19 { 20 class TIntermNode; 21 22 [[nodiscard]] bool RecordUniformBlocksWithLargeArrayMember( 23 TIntermNode *root, 24 std::map<int, const TInterfaceBlock *> &uniformBlockOptimizedMap, 25 std::set<std::string> &slowCompilingUniformBlockSet); 26 } // namespace sh 27 28 #endif // COMPILER_TRANSLATOR_TREEOPS_HLSL_RECORDUNIFORMBLOCKSWITHLARGEARRAYMEMBER_H_ 29