xref: /aosp_15_r20/external/angle/src/compiler/translator/ValidateClipCullDistance.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
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 #include "compiler/translator/Compiler.h"
15 
16 namespace sh
17 {
18 
19 class TIntermBlock;
20 class TDiagnostics;
21 
22 bool ValidateClipCullDistance(TCompiler *compiler,
23                               TIntermBlock *root,
24                               TDiagnostics *diagnostics,
25                               const unsigned int maxCombinedClipAndCullDistances,
26                               uint8_t *clipDistanceSizeOut,
27                               uint8_t *cullDistanceSizeOut,
28                               bool *clipDistanceUsedOut);
29 
30 }  // namespace sh
31 
32 #endif
33