2 // Copyright (c) 2012 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.
7 #ifndef COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
8 #define COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
10 #include "compiler/translator/IntermNode.h"
11 #include "compiler/translator/depgraph/DependencyGraph.h"
15 class RestrictFragmentShaderTiming : TDependencyGraphTraverser {
17 RestrictFragmentShaderTiming(TInfoSinkBase& sink);
18 void enforceRestrictions(const TDependencyGraph& graph);
19 int numErrors() const { return mNumErrors; }
21 virtual void visitArgument(TGraphArgument* parameter);
22 virtual void visitSelection(TGraphSelection* selection);
23 virtual void visitLoop(TGraphLoop* loop);
24 virtual void visitLogicalOp(TGraphLogicalOp* logicalOp);
27 void beginError(const TIntermNode* node);
28 void validateUserDefinedFunctionCallUsage(const TDependencyGraph& graph);
29 bool isSamplingOp(const TIntermAggregate* intermFunctionCall) const;
34 typedef std::set<TString> StringSet;
35 StringSet mSamplingOps;
38 #endif // COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_