summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h b/src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h
index 06f63994cd..e41ccd990c 100644
--- a/src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h
+++ b/src/3rdparty/angle/src/compiler/translator/ValidateOutputs.h
@@ -3,34 +3,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
+// ValidateOutputs validates fragment shader outputs. It checks for conflicting locations,
+// out-of-range locations, that locations are specified when using multiple outputs, and YUV output
+// validity.
+//
#ifndef COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
#define COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
#include "compiler/translator/ExtensionBehavior.h"
-#include "compiler/translator/IntermNode.h"
-
-#include <set>
-class TInfoSinkBase;
-
-class ValidateOutputs : public TIntermTraverser
+namespace sh
{
- public:
- ValidateOutputs(const TExtensionBehavior &extBehavior, int maxDrawBuffers);
-
- int validateAndCountErrors(TInfoSinkBase &sink) const;
- void visitSymbol(TIntermSymbol *) override;
+class TIntermBlock;
+class TDiagnostics;
- private:
- int mMaxDrawBuffers;
- bool mAllowUnspecifiedOutputLocationResolution;
+// Returns true if the shader has no conflicting or otherwise erroneous fragment outputs.
+bool ValidateOutputs(TIntermBlock *root,
+ const TExtensionBehavior &extBehavior,
+ int maxDrawBuffers,
+ TDiagnostics *diagnostics);
- typedef std::vector<TIntermSymbol *> OutputVector;
- OutputVector mOutputs;
- OutputVector mUnspecifiedLocationOutputs;
- std::set<TString> mVisitedSymbols;
-};
+} // namespace sh
-#endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
+#endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_