Edit

kc3-lang/angle/src/compiler/translator/UseInterfaceBlockFields.h

Branch :

  • Show log

    Commit

  • Author : Zhenyao Mo
    Date : 2016-11-09 15:49:51
    Hash : d7490967
    Message : Fix linkage.html failures on Mac. The failure is due to when we initialize variables to 0, we re-create the struct TType, and it contains a different unique id from the original struct TType, thus leading to a different hashed name. BUG=chromium:641129 TEST=webgl_conformance,webgl2_conformance Change-Id: I267b97fa496f55ea59dacee93af8f6a90f3e66cb Reviewed-on: https://chromium-review.googlesource.com/409602 Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>

  • src/compiler/translator/UseInterfaceBlockFields.h
  • //
    // Copyright 2016 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    // UseInterfaceBlockFields.h: insert statements to reference all members in InterfaceBlock list at
    // the beginning of main. This is to work around a Mac driver that treats unused standard/shared
    // uniform blocks as inactive.
    
    #ifndef COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
    #define COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
    
    #include <GLSLANG/ShaderLang.h>
    
    class TIntermNode;
    namespace sh
    {
    
    class TSymbolTable;
    
    using InterfaceBlockList = std::vector<sh::InterfaceBlock>;
    
    void UseInterfaceBlockFields(TIntermNode *root,
                                 const InterfaceBlockList &blocks,
                                 const TSymbolTable &symbolTable);
    
    }  // namespace sh
    
    #endif  // COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_