tor-browser

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

SeparateStructFromUniformDeclarations.h (1168B)


      1 //
      2 // Copyright 2018 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 // SeparateStructFromUniformDeclarations: Separate struct declarations from uniform declarations.
      7 // It necessarily gives nameless uniform structs internal names.
      8 //
      9 // For example:
     10 //   uniform struct { int a; } uni;
     11 // becomes:
     12 //   struct s1 { int a; };
     13 //   uniform s1 uni;
     14 //
     15 // And:
     16 //   uniform struct S { int a; } uni;
     17 // becomes:
     18 //   struct S { int a; };
     19 //   uniform S uni;
     20 //
     21 //
     22 
     23 #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMUNIFORMDECLARATIONS_H_
     24 #define COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMUNIFORMDECLARATIONS_H_
     25 
     26 #include "common/angleutils.h"
     27 
     28 namespace sh
     29 {
     30 class TCompiler;
     31 class TIntermBlock;
     32 class TSymbolTable;
     33 
     34 [[nodiscard]] bool SeparateStructFromUniformDeclarations(TCompiler *compiler,
     35                                                         TIntermBlock *root,
     36                                                         TSymbolTable *symbolTable);
     37 }  // namespace sh
     38 
     39 #endif  // COMPILER_TRANSLATOR_TREEOPS_SEPARATESTRUCTFROMUNIFORMDECLARATIONS_H_