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 7#include "compiler/translator/IntermNode.h" 8 9#include <set> 10 11class TInfoSinkBase; 12 13class 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}; 34