xref: /aosp_15_r20/external/angle/src/compiler/translator/ValidateOutputs.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 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 // ValidateOutputs validates fragment shader outputs. It checks for conflicting locations,
7 // out-of-range locations, that locations are specified when using multiple outputs, and YUV output
8 // validity.
9 //
10 
11 #ifndef COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
12 #define COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
13 
14 #include <GLSLANG/ShaderLang.h>
15 
16 #include "compiler/translator/ExtensionBehavior.h"
17 
18 namespace sh
19 {
20 
21 class TCompiler;
22 class TIntermBlock;
23 class TDiagnostics;
24 
25 // Returns true if the shader has no conflicting or otherwise erroneous fragment outputs.
26 bool ValidateOutputs(TIntermBlock *root,
27                      const TExtensionBehavior &extBehavior,
28                      const ShBuiltInResources &resources,
29                      bool usesPixelLocalStorage,
30                      bool isWebGL,
31                      TDiagnostics *diagnostics);
32 
33 }  // namespace sh
34 
35 #endif  // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_
36