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 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 7 | #ifndef COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_ |
| 8 | #define COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_ |
| 9 | |
Kimmo Kinnunen | b18609b | 2015-07-16 14:13:11 +0300 | [diff] [blame] | 10 | #include "compiler/translator/ExtensionBehavior.h" |
Jamie Madill | b1a85f4 | 2014-08-19 15:23:24 -0400 | [diff] [blame] | 11 | #include "compiler/translator/IntermNode.h" |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 12 | |
| 13 | #include <set> |
| 14 | |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 15 | namespace sh |
| 16 | { |
| 17 | |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 18 | class TInfoSinkBase; |
| 19 | |
| 20 | class ValidateOutputs : public TIntermTraverser |
| 21 | { |
| 22 | public: |
Kimmo Kinnunen | b18609b | 2015-07-16 14:13:11 +0300 | [diff] [blame] | 23 | ValidateOutputs(const TExtensionBehavior &extBehavior, int maxDrawBuffers); |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 24 | |
Olli Etuaho | 77ba408 | 2016-12-16 12:01:18 +0000 | [diff] [blame] | 25 | void validate(TDiagnostics *diagnostics) const; |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 26 | |
Corentin Wallez | e5a1f27 | 2015-08-21 02:58:25 +0200 | [diff] [blame] | 27 | void visitSymbol(TIntermSymbol *) override; |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 28 | |
| 29 | private: |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 30 | int mMaxDrawBuffers; |
Kimmo Kinnunen | b18609b | 2015-07-16 14:13:11 +0300 | [diff] [blame] | 31 | bool mAllowUnspecifiedOutputLocationResolution; |
Andrei Volykhin | a552707 | 2017-03-22 16:46:30 +0300 | [diff] [blame] | 32 | bool mUsesFragDepth; |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 33 | |
Kimmo Kinnunen | b18609b | 2015-07-16 14:13:11 +0300 | [diff] [blame] | 34 | typedef std::vector<TIntermSymbol *> OutputVector; |
| 35 | OutputVector mOutputs; |
| 36 | OutputVector mUnspecifiedLocationOutputs; |
Andrei Volykhin | a552707 | 2017-03-22 16:46:30 +0300 | [diff] [blame] | 37 | OutputVector mYuvOutputs; |
Jamie Madill | 5ed2398 | 2016-04-22 15:08:57 -0400 | [diff] [blame] | 38 | std::set<std::string> mVisitedSymbols; |
Jamie Madill | 05a80ce | 2013-06-20 11:55:49 -0400 | [diff] [blame] | 39 | }; |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 40 | |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 41 | } // namespace sh |
| 42 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 43 | #endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_ |