Path: blob/main_old/src/compiler/translator/DirectiveHandler.h
1693 views
//1// Copyright 2012 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//56#ifndef COMPILER_TRANSLATOR_DIRECTIVEHANDLER_H_7#define COMPILER_TRANSLATOR_DIRECTIVEHANDLER_H_89#include "GLSLANG/ShaderLang.h"10#include "common/angleutils.h"11#include "compiler/preprocessor/DirectiveHandlerBase.h"12#include "compiler/translator/ExtensionBehavior.h"13#include "compiler/translator/Pragma.h"1415namespace sh16{17class TDiagnostics;1819class TDirectiveHandler : public angle::pp::DirectiveHandler, angle::NonCopyable20{21public:22TDirectiveHandler(TExtensionBehavior &extBehavior,23TDiagnostics &diagnostics,24int &shaderVersion,25sh::GLenum shaderType);26~TDirectiveHandler() override;2728const TPragma &pragma() const { return mPragma; }29const TExtensionBehavior &extensionBehavior() const { return mExtensionBehavior; }3031void handleError(const angle::pp::SourceLocation &loc, const std::string &msg) override;3233void handlePragma(const angle::pp::SourceLocation &loc,34const std::string &name,35const std::string &value,36bool stdgl) override;3738void handleExtension(const angle::pp::SourceLocation &loc,39const std::string &name,40const std::string &behavior) override;4142void handleVersion(const angle::pp::SourceLocation &loc,43int version,44ShShaderSpec spec) override;4546private:47TPragma mPragma;48TExtensionBehavior &mExtensionBehavior;49TDiagnostics &mDiagnostics;50int &mShaderVersion;51sh::GLenum mShaderType;52};5354} // namespace sh5556#endif // COMPILER_TRANSLATOR_DIRECTIVEHANDLER_H_575859