1 // 2 // Copyright 2019 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 // RemoveInactiveInterfaceVariables.h: 7 // Drop shader interface variable declarations for those that are inactive. This step needs to be 8 // done after CollectVariables. This avoids having to emulate them (e.g. atomic counters for 9 // Vulkan) or remove them in glslang wrapper (again, for Vulkan). 10 // 11 // Shouldn't be run for the GL backend, as it queries shader interface variables from GL itself, 12 // instead of relying on what was gathered during CollectVariables. 13 // 14 15 #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_ 16 #define COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_ 17 18 #include "common/angleutils.h" 19 20 namespace sh 21 { 22 23 struct InterfaceBlock; 24 struct ShaderVariable; 25 class TCompiler; 26 class TIntermBlock; 27 class TSymbolTable; 28 29 ANGLE_NO_DISCARD bool RemoveInactiveInterfaceVariables( 30 TCompiler *compiler, 31 TIntermBlock *root, 32 const std::vector<sh::ShaderVariable> &attributes, 33 const std::vector<sh::ShaderVariable> &inputVaryings, 34 const std::vector<sh::ShaderVariable> &outputVariables, 35 const std::vector<sh::ShaderVariable> &uniforms, 36 const std::vector<sh::InterfaceBlock> &interfaceBlocks); 37 38 } // namespace sh 39 40 #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_ 41