1 // 2 // Copyright 2002 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 // RemoveDynamicIndexing is an AST traverser to remove dynamic indexing of non-SSBO vectors and 7 // matrices, replacing them with calls to functions that choose which component to return or write. 8 // We don't need to consider dynamic indexing in SSBO since it can be directly as part of the offset 9 // of RWByteAddressBuffer. 10 // 11 12 #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_ 13 #define COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_ 14 15 #include "common/angleutils.h" 16 17 #include <functional> 18 19 namespace sh 20 { 21 22 class TCompiler; 23 class TIntermNode; 24 class TIntermBinary; 25 class TSymbolTable; 26 class PerformanceDiagnostics; 27 28 ANGLE_NO_DISCARD bool RemoveDynamicIndexingOfNonSSBOVectorOrMatrix( 29 TCompiler *compiler, 30 TIntermNode *root, 31 TSymbolTable *symbolTable, 32 PerformanceDiagnostics *perfDiagnostics); 33 34 ANGLE_NO_DISCARD bool RemoveDynamicIndexingOfSwizzledVector( 35 TCompiler *compiler, 36 TIntermNode *root, 37 TSymbolTable *symbolTable, 38 PerformanceDiagnostics *perfDiagnostics); 39 40 } // namespace sh 41 42 #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_ 43