Path: blob/main_old/src/compiler/translator/ExtensionGLSL.h
1693 views
//1// Copyright 2015 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// ExtensionGLSL.h: Defines the TExtensionGLSL class that tracks GLSL extension requirements of6// shaders.78#ifndef COMPILER_TRANSLATOR_EXTENSIONGLSL_H_9#define COMPILER_TRANSLATOR_EXTENSIONGLSL_H_1011#include <set>12#include <string>1314#include "compiler/translator/tree_util/IntermTraverse.h"1516namespace sh17{1819// Traverses the intermediate tree to determine which GLSL extensions are required20// to support the shader.21class TExtensionGLSL : public TIntermTraverser22{23public:24TExtensionGLSL(ShShaderOutput output);2526const std::set<std::string> &getEnabledExtensions() const;27const std::set<std::string> &getRequiredExtensions() const;2829bool visitUnary(Visit visit, TIntermUnary *node) override;30bool visitAggregate(Visit visit, TIntermAggregate *node) override;3132private:33void checkOperator(TIntermOperator *node);3435int mTargetVersion;3637std::set<std::string> mEnabledExtensions;38std::set<std::string> mRequiredExtensions;39};4041} // namespace sh4243#endif // COMPILER_TRANSLATOR_EXTENSIONGLSL_H_444546