tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RemoveDynamicIndexing.h (1419B)


      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 [[nodiscard]] bool RemoveDynamicIndexingOfNonSSBOVectorOrMatrix(
     29    TCompiler *compiler,
     30    TIntermNode *root,
     31    TSymbolTable *symbolTable,
     32    PerformanceDiagnostics *perfDiagnostics);
     33 
     34 [[nodiscard]] bool RemoveDynamicIndexingOfSwizzledVector(TCompiler *compiler,
     35                                                         TIntermNode *root,
     36                                                         TSymbolTable *symbolTable,
     37                                                         PerformanceDiagnostics *perfDiagnostics);
     38 
     39 }  // namespace sh
     40 
     41 #endif  // COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_