Block/non-block uniforms match
[platform/upstream/VK-GL-CTS.git] / external / openglcts / modules / common / glcTestPackage.hpp
1 #ifndef _GLCTESTPACKAGE_HPP
2 #define _GLCTESTPACKAGE_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2016 Google Inc.
8  * Copyright (c) 2016 The Khronos Group Inc.
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *      http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */ /*!
23  * \file
24  * \brief OpenGL Conformance Test Package Base Class
25  */ /*-------------------------------------------------------------------*/
26
27 #include "glcContext.hpp"
28 #include "glcTestCaseWrapper.hpp"
29 #include "tcuDefs.hpp"
30 #include "tcuResource.hpp"
31 #include "tcuTestPackage.hpp"
32
33 namespace deqp
34 {
35
36 class PackageContext
37 {
38 public:
39         PackageContext(tcu::TestContext& testCtx, glu::ContextType renderContextType);
40         ~PackageContext(void);
41
42         Context& getContext(void)
43         {
44                 return m_context;
45         }
46         TestCaseWrapper& getTestCaseWrapper(void)
47         {
48                 return m_caseWrapper;
49         }
50
51 private:
52         Context                 m_context;
53         TestCaseWrapper m_caseWrapper;
54 };
55
56 class TestPackage : public tcu::TestPackage
57 {
58 public:
59         TestPackage(tcu::TestContext& testCtx, const char* name, const char* description,
60                                 glu::ContextType renderContextType, const char* resourcesPath);
61         virtual ~TestPackage(void);
62
63         void init(void);
64         void deinit(void);
65
66         TestCaseWrapper& getTestCaseWrapper(void)
67         {
68                 return m_packageCtx->getTestCaseWrapper();
69         }
70         tcu::Archive* getArchive(void)
71         {
72                 return &m_archive;
73         }
74
75         Context& getContext(void)
76         {
77                 return m_packageCtx->getContext();
78         }
79
80 private:
81         TestPackage(const TestPackage& other);
82         TestPackage& operator=(const TestPackage& other);
83
84         glu::ContextType m_renderContextType;
85
86         PackageContext*         m_packageCtx;
87         tcu::ResourcePrefix m_archive;
88 };
89
90 } // deqp
91
92 #endif // _GLCTESTPACKAGE_HPP