xref: /aosp_15_r20/external/angle/src/libANGLE/validationES3.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker //
2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2018 The ANGLE Project Authors. All rights reserved.
3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker //
6*8975f5c5SAndroid Build Coastguard Worker // validationES3.h:
7*8975f5c5SAndroid Build Coastguard Worker //  Inlined validation functions for OpenGL ES 3.0 entry points.
8*8975f5c5SAndroid Build Coastguard Worker 
9*8975f5c5SAndroid Build Coastguard Worker #ifndef LIBANGLE_VALIDATION_ES3_H_
10*8975f5c5SAndroid Build Coastguard Worker #define LIBANGLE_VALIDATION_ES3_H_
11*8975f5c5SAndroid Build Coastguard Worker 
12*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/ErrorStrings.h"
13*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/validationES3_autogen.h"
14*8975f5c5SAndroid Build Coastguard Worker 
15*8975f5c5SAndroid Build Coastguard Worker namespace gl
16*8975f5c5SAndroid Build Coastguard Worker {
17*8975f5c5SAndroid Build Coastguard Worker bool ValidateTexImageFormatCombination(const Context *context,
18*8975f5c5SAndroid Build Coastguard Worker                                        angle::EntryPoint entryPoint,
19*8975f5c5SAndroid Build Coastguard Worker                                        TextureType target,
20*8975f5c5SAndroid Build Coastguard Worker                                        GLenum internalFormat,
21*8975f5c5SAndroid Build Coastguard Worker                                        GLenum format,
22*8975f5c5SAndroid Build Coastguard Worker                                        GLenum type);
23*8975f5c5SAndroid Build Coastguard Worker 
24*8975f5c5SAndroid Build Coastguard Worker bool ValidateES3TexImageParametersBase(const Context *context,
25*8975f5c5SAndroid Build Coastguard Worker                                        angle::EntryPoint entryPoint,
26*8975f5c5SAndroid Build Coastguard Worker                                        TextureTarget target,
27*8975f5c5SAndroid Build Coastguard Worker                                        GLint level,
28*8975f5c5SAndroid Build Coastguard Worker                                        GLenum internalformat,
29*8975f5c5SAndroid Build Coastguard Worker                                        bool isCompressed,
30*8975f5c5SAndroid Build Coastguard Worker                                        bool isSubImage,
31*8975f5c5SAndroid Build Coastguard Worker                                        GLint xoffset,
32*8975f5c5SAndroid Build Coastguard Worker                                        GLint yoffset,
33*8975f5c5SAndroid Build Coastguard Worker                                        GLint zoffset,
34*8975f5c5SAndroid Build Coastguard Worker                                        GLsizei width,
35*8975f5c5SAndroid Build Coastguard Worker                                        GLsizei height,
36*8975f5c5SAndroid Build Coastguard Worker                                        GLsizei depth,
37*8975f5c5SAndroid Build Coastguard Worker                                        GLint border,
38*8975f5c5SAndroid Build Coastguard Worker                                        GLenum format,
39*8975f5c5SAndroid Build Coastguard Worker                                        GLenum type,
40*8975f5c5SAndroid Build Coastguard Worker                                        GLsizei imageSize,
41*8975f5c5SAndroid Build Coastguard Worker                                        const void *pixels);
42*8975f5c5SAndroid Build Coastguard Worker 
43*8975f5c5SAndroid Build Coastguard Worker bool ValidateES3TexStorageParametersLevel(const Context *context,
44*8975f5c5SAndroid Build Coastguard Worker                                           angle::EntryPoint entryPoint,
45*8975f5c5SAndroid Build Coastguard Worker                                           TextureType target,
46*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei levels,
47*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei width,
48*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei height,
49*8975f5c5SAndroid Build Coastguard Worker                                           GLsizei depth);
50*8975f5c5SAndroid Build Coastguard Worker 
51*8975f5c5SAndroid Build Coastguard Worker bool ValidateES3TexStorageParametersExtent(const Context *context,
52*8975f5c5SAndroid Build Coastguard Worker                                            angle::EntryPoint entryPoint,
53*8975f5c5SAndroid Build Coastguard Worker                                            TextureType target,
54*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei levels,
55*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei width,
56*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei height,
57*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei depth);
58*8975f5c5SAndroid Build Coastguard Worker 
59*8975f5c5SAndroid Build Coastguard Worker bool ValidateES3TexStorageParametersTexObject(const Context *context,
60*8975f5c5SAndroid Build Coastguard Worker                                               angle::EntryPoint entryPoint,
61*8975f5c5SAndroid Build Coastguard Worker                                               TextureType target);
62*8975f5c5SAndroid Build Coastguard Worker 
63*8975f5c5SAndroid Build Coastguard Worker bool ValidateES3TexStorageParametersFormat(const Context *context,
64*8975f5c5SAndroid Build Coastguard Worker                                            angle::EntryPoint entryPoint,
65*8975f5c5SAndroid Build Coastguard Worker                                            TextureType target,
66*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei levels,
67*8975f5c5SAndroid Build Coastguard Worker                                            GLenum internalformat,
68*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei width,
69*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei height,
70*8975f5c5SAndroid Build Coastguard Worker                                            GLsizei depth);
71*8975f5c5SAndroid Build Coastguard Worker 
72*8975f5c5SAndroid Build Coastguard Worker bool ValidateProgramParameteriBase(const Context *context,
73*8975f5c5SAndroid Build Coastguard Worker                                    angle::EntryPoint entryPoint,
74*8975f5c5SAndroid Build Coastguard Worker                                    ShaderProgramID program,
75*8975f5c5SAndroid Build Coastguard Worker                                    GLenum pname,
76*8975f5c5SAndroid Build Coastguard Worker                                    GLint value);
77*8975f5c5SAndroid Build Coastguard Worker }  // namespace gl
78*8975f5c5SAndroid Build Coastguard Worker 
79*8975f5c5SAndroid Build Coastguard Worker #endif  // LIBANGLE_VALIDATION_ES3_H_
80