• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _GLCTEXTURESTORAGETESTS_HPP
2 #define _GLCTEXTURESTORAGETESTS_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2024 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */ /*!
22  * \file
23  * \brief
24  */ /*-------------------------------------------------------------------*/
25 
26 /**
27  */ /*!
28  * \file  glcTextureStorageTests.hpp
29  * \brief Conformance tests for textureStorage operations.
30  */ /*-------------------------------------------------------------------*/
31 
32 #include "glcTestCase.hpp"
33 #include "glwDefs.hpp"
34 #include "tcuDefs.hpp"
35 
36 namespace glcts
37 {
38 
39 /*
40 2.3 Verify that compressed texture data can be loaded into a new
41     (i.e., recently created) texture, or updated in an existing texture
42 
43 In a manner similar to test 2.2, verify that compressed texture
44     data (e.g., RGTC and BPTC for OpenGL; and EAC/ETC2 for OpenGL ES)
45     for each API can be loaded into a texture created by TexStorage.
46 */
47 class TextureStorageCompressedDataTestCase : public deqp::TestCase
48 {
49 public:
50     /* Public methods */
51     TextureStorageCompressedDataTestCase(deqp::Context &context);
52 
53     void deinit();
54     void init();
55     tcu::TestNode::IterateResult iterate();
56 
57 protected:
58     bool iterate_gl();
59     bool iterate_gles();
60 
61 private:
62     /* Private methods */
63 
64     bool m_isContextES;
65     bool m_testSupported;
66 
67     glw::GLuint m_texture2D, m_textureCubeMap, m_texture3D, m_texture2DArray;
68     const int m_textureSize2D = 512;
69     const int m_textureSize3D = 64;
70     int m_maxTexturePixels;
71     int m_textureLevels2D;
72     int m_textureLevels3D;
73 
74     std::vector<glw::GLfloat> m_texData;
75 };
76 
77 /** Test group which encapsulates all conformance tests */
78 class TextureStorageTests : public deqp::TestCaseGroup
79 {
80 public:
81     /* Public methods */
82     TextureStorageTests(deqp::Context &context);
83 
84     void init();
85 
86 private:
87     TextureStorageTests(const TextureStorageTests &other);
88     TextureStorageTests &operator=(const TextureStorageTests &other);
89 };
90 
91 } // namespace glcts
92 
93 #endif // _GLCTEXTURESTORAGETESTS_HPP
94