1 // 2 // Copyright 2020 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 // The ValidateClipCullDistance function checks if the sum of array sizes for gl_ClipDistance and 7 // gl_CullDistance exceeds gl_MaxCombinedClipAndCullDistances 8 // 9 10 #ifndef COMPILER_TRANSLATOR_VALIDATECLIPCULLDISTANCE_H_ 11 #define COMPILER_TRANSLATOR_VALIDATECLIPCULLDISTANCE_H_ 12 13 #include "GLSLANG/ShaderVars.h" 14 15 namespace sh 16 { 17 18 class TIntermBlock; 19 class TDiagnostics; 20 21 bool ValidateClipCullDistance(TIntermBlock *root, 22 TDiagnostics *diagnostics, 23 const unsigned int maxCullDistances, 24 const unsigned int maxCombinedClipAndCullDistances, 25 uint8_t *clipDistanceSizeOut, 26 uint8_t *cullDistanceSizeOut, 27 bool *clipDistanceRedeclaredOut, 28 bool *cullDistanceRedeclaredOut, 29 bool *clipDistanceUsedOut); 30 31 } // namespace sh 32 33 #endif 34