Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2013 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 | |
Jamie Madill | b1a85f4 | 2014-08-19 15:23:24 -0400 | [diff] [blame] | 7 | #include "compiler/translator/IntermNode.h" |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 8 | |
| 9 | #include <set> |
| 10 | |
| 11 | class TInfoSinkBase; |
| 12 | |
| 13 | class ValidateOutputs : public TIntermTraverser |
| 14 | { |
| 15 | public: |
| 16 | ValidateOutputs(TInfoSinkBase& sink, int maxDrawBuffers); |
| 17 | |
| 18 | int numErrors() const { return mNumErrors; } |
| 19 | |
| 20 | virtual void visitSymbol(TIntermSymbol*); |
| 21 | |
| 22 | private: |
| 23 | TInfoSinkBase& mSink; |
| 24 | int mMaxDrawBuffers; |
| 25 | int mNumErrors; |
| 26 | bool mHasUnspecifiedOutputLocation; |
| 27 | |
| 28 | typedef std::map<int, TIntermSymbol*> OutputMap; |
| 29 | OutputMap mOutputMap; |
| 30 | std::set<TString> mVisitedSymbols; |
| 31 | |
| 32 | void error(TSourceLoc loc, const char *reason, const char* token); |
| 33 | }; |