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 "compiler/translator/ExtensionBehavior.h" 15 16 namespace sh 17 { 18 19 class TCompiler; 20 class TIntermBlock; 21 class TDiagnostics; 22 23 // Returns true if the shader has no conflicting or otherwise erroneous fragment outputs. 24 bool ValidateOutputs(TIntermBlock *root, 25 const TExtensionBehavior &extBehavior, 26 int maxDrawBuffers, 27 bool usesPixelLocalStorage, 28 TDiagnostics *diagnostics); 29 30 } // namespace sh 31 32 #endif // COMPILER_TRANSLATOR_VALIDATEOUTPUTS_H_ 33