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.
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).
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.
15
#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_
16
#define COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_
18
#include "common/angleutils.h"
23
struct InterfaceBlock;
24
struct ShaderVariable;
29
ANGLE_NO_DISCARD bool RemoveInactiveInterfaceVariables(
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);
40
#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEINACTIVEVARIABLES_H_