tor-browser

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

UseInterfaceBlockFields.h (1519B)


      1 //
      2 // Copyright 2016 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 // UseInterfaceBlockFields.h: insert statements to reference all members in InterfaceBlock list at
      8 // the beginning of main. This is to work around a Mac driver that treats unused standard/shared
      9 // uniform blocks as inactive.
     10 
     11 #ifndef COMPILER_TRANSLATOR_TREEOPS_GL_USEINTERFACEBLOCKFIELDS_H_
     12 #define COMPILER_TRANSLATOR_TREEOPS_GL_USEINTERFACEBLOCKFIELDS_H_
     13 
     14 #include <GLSLANG/ShaderLang.h>
     15 #include "common/angleutils.h"
     16 
     17 namespace sh
     18 {
     19 
     20 class TCompiler;
     21 class TIntermBlock;
     22 class TSymbolTable;
     23 
     24 using InterfaceBlockList = std::vector<sh::InterfaceBlock>;
     25 
     26 #ifdef ANGLE_ENABLE_GLSL
     27 [[nodiscard]] bool UseInterfaceBlockFields(TCompiler *compiler,
     28                                           TIntermBlock *root,
     29                                           const InterfaceBlockList &blocks,
     30                                           const TSymbolTable &symbolTable);
     31 #else
     32 [[nodiscard]] ANGLE_INLINE bool UseInterfaceBlockFields(TCompiler *compiler,
     33                                                        TIntermBlock *root,
     34                                                        const InterfaceBlockList &blocks,
     35                                                        const TSymbolTable &symbolTable)
     36 {
     37    UNREACHABLE();
     38    return false;
     39 }
     40 #endif
     41 
     42 }  // namespace sh
     43 
     44 #endif  // COMPILER_TRANSLATOR_TREEOPS_GL_USEINTERFACEBLOCKFIELDS_H_