1 /*-------------------------------------------------------------------------
2 * OpenGL Conformance Test Suite
3 * -----------------------------
4 *
5 * Copyright (c) 2014-2016 The Khronos Group Inc.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 */ /*!
20 * \file
21 * \brief
22 */ /*-------------------------------------------------------------------*/
23
24 /**
25 */ /*!
26 * \file es31cTextureStorageMultisampleTests.cpp
27 * \brief Implements test group consisting of all the tests verifying
28 * multisample texture functionality. (ES3.1 only)
29 */ /*-------------------------------------------------------------------*/
30
31 #include "es31cTextureStorageMultisampleTests.hpp"
32 #include "es31cTextureStorageMultisampleDependenciesTests.hpp"
33 #include "es31cTextureStorageMultisampleFunctionalTests.hpp"
34 #include "es31cTextureStorageMultisampleGLCoverageTests.hpp"
35 #include "es31cTextureStorageMultisampleGetActiveUniformTests.hpp"
36 #include "es31cTextureStorageMultisampleGetMultisamplefvTests.hpp"
37 #include "es31cTextureStorageMultisampleGetTexLevelParameterifvTests.hpp"
38 #include "es31cTextureStorageMultisampleSampleMaskiTests.hpp"
39 #include "es31cTextureStorageMultisampleTexStorage2DMultisampleTests.hpp"
40 #include "es31cTextureStorageMultisampleTexStorage3DMultisampleTests.hpp"
41
42 namespace glcts
43 {
44 /** Constructor.
45 *
46 * @param context Rendering context.
47 **/
TextureStorageMultisampleTests(Context & context)48 TextureStorageMultisampleTests::TextureStorageMultisampleTests(Context& context)
49 : TestCaseGroup(context, "texture_storage_multisample", "Multisample texture storage conformance test group")
50 {
51 /* Left blank on purpose */
52 }
53
54 /** Initializes a texture_storage_multisample test group.
55 *
56 **/
init(void)57 void TextureStorageMultisampleTests::init(void)
58 {
59 /* Creating Tests Groups */
60 tcu::TestCaseGroup* apiGLGetActiveUniformTestGroup =
61 new tcu::TestCaseGroup(m_testCtx, "APIGLGetActiveUniform", "glGetActiveUniform()");
62 tcu::TestCaseGroup* apiGLTexStorage2DMultisampleTestGroup =
63 new tcu::TestCaseGroup(m_testCtx, "APIGLTexStorage2DMultisample", "glTexStorage2DMultisample()");
64 tcu::TestCaseGroup* apiGLTexStorage3DMultisampleTestGroup =
65 new tcu::TestCaseGroup(m_testCtx, "APIGLTexStorage3DMultisample", "glTexStorage3DMultisampleOES()");
66 tcu::TestCaseGroup* apiGLGetMultisamplefvTestGroup =
67 new tcu::TestCaseGroup(m_testCtx, "APIGLGetMultisamplefv", "glGetMultisamplefv()");
68 tcu::TestCaseGroup* apiGLGetTexLevelParameterifvTestGroup =
69 new tcu::TestCaseGroup(m_testCtx, "APIGLGetTexLevelParameterifv", "glGetTexLevelParameterifv()");
70 tcu::TestCaseGroup* apiGLSampleMaskiTestGroup =
71 new tcu::TestCaseGroup(m_testCtx, "APIGLSampleMaski", "glSampleMaski()");
72 tcu::TestCaseGroup* apiDependenciesTestGroup =
73 new tcu::TestCaseGroup(m_testCtx, "APIDependencies", "API Dependncies");
74 tcu::TestCaseGroup* apiGLCoverageTestGroup = new tcu::TestCaseGroup(m_testCtx, "GLCoverage", "GL Coverage");
75 tcu::TestCaseGroup* functionalTestGroup = new tcu::TestCaseGroup(m_testCtx, "FunctionalTests", "Functional Tests");
76
77 /* Adding tests groups as children of this test suite */
78 addChild(apiGLGetActiveUniformTestGroup);
79 addChild(apiGLTexStorage2DMultisampleTestGroup);
80 addChild(apiGLTexStorage3DMultisampleTestGroup);
81 addChild(apiGLGetMultisamplefvTestGroup);
82 addChild(apiGLGetTexLevelParameterifvTestGroup);
83 addChild(apiGLSampleMaskiTestGroup);
84 addChild(apiDependenciesTestGroup);
85 addChild(apiGLCoverageTestGroup);
86 addChild(functionalTestGroup);
87
88 /* Assign tests to parent group: APIGLGetActiveUniform */
89 apiGLGetActiveUniformTestGroup->addChild(new glcts::MultisampleTextureGetActiveUniformSamplersTest(m_context));
90
91 /* Assign tests to parent group: APIGLTexStorage2DMultisample */
92 apiGLTexStorage2DMultisampleTestGroup->addChild(
93 new glcts::MultisampleTextureTexStorage2DGeneralSamplesNumberTest(m_context));
94 apiGLTexStorage2DMultisampleTestGroup->addChild(
95 new glcts::MultisampleTextureTexStorage2DInvalidAndBorderCaseTextureSizesTest(m_context));
96 apiGLTexStorage2DMultisampleTestGroup->addChild(
97 new glcts::MultisampleTextureTexStorage2DNonColorDepthOrStencilInternalFormatsTest(m_context));
98 apiGLTexStorage2DMultisampleTestGroup->addChild(
99 new glcts::MultisampleTextureTexStorage2DReconfigurationRejectedTest(m_context));
100 apiGLTexStorage2DMultisampleTestGroup->addChild(
101 new glcts::MultisampleTextureTexStorage2DTexture2DMultisampleArrayTest(m_context));
102 apiGLTexStorage2DMultisampleTestGroup->addChild(
103 new glcts::MultisampleTextureTexStorage2DUnsupportedSamplesCountForColorTexturesTest(m_context));
104 apiGLTexStorage2DMultisampleTestGroup->addChild(
105 new glcts::MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthTexturesTest(m_context));
106 apiGLTexStorage2DMultisampleTestGroup->addChild(
107 new glcts::MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthStencilTexturesTest(m_context));
108 apiGLTexStorage2DMultisampleTestGroup->addChild(new glcts::MultisampleTextureTexStorage2DValidCallsTest(m_context));
109 apiGLTexStorage2DMultisampleTestGroup->addChild(new glcts::MultisampleTextureTexStorage2DZeroSampleTest(m_context));
110
111 /* Assign tests to parent group: APIGLTexStorage3DMultisample */
112 apiGLTexStorage3DMultisampleTestGroup->addChild(
113 new glcts::InvalidTextureSizesAreRejectedValidAreAcceptedTest(m_context));
114 apiGLTexStorage3DMultisampleTestGroup->addChild(new glcts::MultisampleTextureTexStorage3DZeroSampleTest(m_context));
115 apiGLTexStorage3DMultisampleTestGroup->addChild(
116 new glcts::NonColorDepthStencilRenderableInternalformatsAreRejectedTest(m_context));
117 apiGLTexStorage3DMultisampleTestGroup->addChild(
118 new glcts::RequestsToSetUpMultisampleColorTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(m_context));
119 apiGLTexStorage3DMultisampleTestGroup->addChild(
120 new glcts::RequestsToSetUpMultisampleDepthTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(m_context));
121 apiGLTexStorage3DMultisampleTestGroup->addChild(
122 new glcts::RequestsToSetUpMultisampleStencilTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(m_context));
123 apiGLTexStorage3DMultisampleTestGroup->addChild(
124 new glcts::RequestsToSetUpMultisampleTexturesWithValidAndInvalidNumberOfSamplesTest(m_context));
125 apiGLTexStorage3DMultisampleTestGroup->addChild(new glcts::Texture2DMultisampleTargetIsRejectedTest(m_context));
126 apiGLTexStorage3DMultisampleTestGroup->addChild(
127 new glcts::ValidInternalformatAndSamplesValuesAreAcceptedTest(m_context));
128
129 /* Assign tests to parent group: APIGLGetMultisamplefv */
130 apiGLGetMultisamplefvTestGroup->addChild(
131 new glcts::MultisampleTextureGetMultisamplefvIndexEqualGLSamplesRejectedTest(m_context));
132 apiGLGetMultisamplefvTestGroup->addChild(
133 new glcts::MultisampleTextureGetMultisamplefvIndexGreaterGLSamplesRejectedTest(m_context));
134 apiGLGetMultisamplefvTestGroup->addChild(
135 new glcts::MultisampleTextureGetMultisamplefvInvalidPnameRejectedTest(m_context));
136 apiGLGetMultisamplefvTestGroup->addChild(
137 new glcts::MultisampleTextureGetMultisamplefvNullValArgumentsAcceptedTest(m_context));
138 apiGLGetMultisamplefvTestGroup->addChild(
139 new glcts::MultisampleTextureGetMultisamplefvSamplePositionValuesValidationTest(m_context));
140
141 /* Assign tests to parent group: APIGLGetTexLevelParameterifv */
142 apiGLGetTexLevelParameterifvTestGroup->addChild(
143 new glcts::MultisampleTextureGetTexLevelParametervFunctionalTest(m_context));
144 apiGLGetTexLevelParameterifvTestGroup->addChild(
145 new glcts::MultisampleTextureGetTexLevelParametervInvalidTextureTargetRejectedTest(m_context));
146 apiGLGetTexLevelParameterifvTestGroup->addChild(
147 new glcts::MultisampleTextureGetTexLevelParametervInvalidValueArgumentRejectedTest(m_context));
148 apiGLGetTexLevelParameterifvTestGroup->addChild(
149 new glcts::MultisampleTextureGetTexLevelParametervNegativeLodIsRejectedTest(m_context));
150 apiGLGetTexLevelParameterifvTestGroup->addChild(
151 new glcts::MultisampleTextureGetTexLevelParametervWorksForMaximumLodTest(m_context));
152
153 /* Assign tests to parent group: APIGLSampleMaski */
154 apiGLGetMultisamplefvTestGroup->addChild(new glcts::MultisampleTextureSampleMaskiGettersTest(m_context));
155 apiGLGetMultisamplefvTestGroup->addChild(
156 new glcts::MultisampleTextureSampleMaskiIndexLowerThanGLMaxSampleMaskWordsTest(m_context));
157 apiGLGetMultisamplefvTestGroup->addChild(
158 new glcts::MultisampleTextureSampleMaskiIndexEqualToGLMaxSampleMaskWordsTest(m_context));
159 apiGLGetMultisamplefvTestGroup->addChild(
160 new glcts::MultisampleTextureSampleMaskiIndexGreaterGLMaxSampleMaskWordsTest(m_context));
161
162 /* Assign tests to parent group: APIDependencies */
163 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesFBOIncompleteness1Test(m_context));
164 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesFBOIncompleteness2Test(m_context));
165 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesFBOIncompleteness3Test(m_context));
166 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesFBOIncompleteness4Test(m_context));
167 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesFBOIncompleteness5Test(m_context));
168 apiDependenciesTestGroup->addChild(
169 new glcts::MultisampleTextureDependenciesInvalidFramebufferTexture2DCalls1Test(m_context));
170 apiDependenciesTestGroup->addChild(
171 new glcts::MultisampleTextureDependenciesInvalidFramebufferTexture2DCalls2Test(m_context));
172 apiDependenciesTestGroup->addChild(
173 new glcts::MultisampleTextureDependenciesInvalidFramebufferTextureLayerCalls1Test(m_context));
174 apiDependenciesTestGroup->addChild(
175 new glcts::MultisampleTextureDependenciesInvalidFramebufferTextureLayerCalls2Test(m_context));
176 apiDependenciesTestGroup->addChild(
177 new glcts::MultisampleTextureDependenciesInvalidRenderbufferStorageMultisampleCalls1Test(m_context));
178 apiDependenciesTestGroup->addChild(
179 new glcts::MultisampleTextureDependenciesInvalidRenderbufferStorageMultisampleCalls2Test(m_context));
180 apiDependenciesTestGroup->addChild(
181 new glcts::MultisampleTextureDependenciesNoErrorGeneratedForValidFramebufferTexture2DCallsTest(m_context));
182 apiDependenciesTestGroup->addChild(
183 new glcts::MultisampleTextureDependenciesNoErrorGeneratedForValidRenderbufferStorageMultisampleCallsTest(
184 m_context));
185 apiDependenciesTestGroup->addChild(new glcts::MultisampleTextureDependenciesTexParameterTest(m_context));
186
187 /* Assign tests to parent group: GLCoverage */
188 apiGLCoverageTestGroup->addChild(new glcts::GLCoverageExtensionSpecificEnumsAreRecognizedTest(m_context));
189 apiGLCoverageTestGroup->addChild(
190 new glcts::GLCoverageGLGetTexParameterReportsCorrectDefaultValuesForMultisampleTextureTargets(m_context));
191 apiGLCoverageTestGroup->addChild(new glcts::GLCoverageGLSampleMaskModeStatusIsReportedCorrectlyTest(m_context));
192 apiGLCoverageTestGroup->addChild(
193 new glcts::GLCoverageGLTexParameterHandlersAcceptZeroBaseLevelForExtensionSpecificTextureTargetsTest(
194 m_context));
195
196 /* Assign tests to parent group: FunctionalTests */
197 functionalTestGroup->addChild(new glcts::MultisampleTextureFunctionalTestsBlittingTest(m_context));
198 functionalTestGroup->addChild(
199 new glcts::MultisampleTextureFunctionalTestsBlittingMultisampledDepthAttachmentTest(m_context));
200 functionalTestGroup->addChild(
201 new glcts::MultisampleTextureFunctionalTestsBlittingMultisampledIntegerAttachmentTest(m_context));
202 functionalTestGroup->addChild(
203 new glcts::MultisampleTextureFunctionalTestsBlittingToMultisampledFBOIsForbiddenTest(m_context));
204 functionalTestGroup->addChild(
205 new glcts::MultisampleTextureFunctionalTestsSampleMaskingForNonIntegerColorRenderableTexturesTest(m_context));
206 // TODO: temporarily disabled per request. Needs to be fixed.
207 //functionalTestGroup->addChild(new glcts::MultisampleTextureFunctionalTestsSampleMaskingTexturesTest (m_context) );
208 functionalTestGroup->addChild(
209 new glcts::MultisampleTextureFunctionalTestsTextureSizeFragmentShadersTest(m_context));
210 functionalTestGroup->addChild(new glcts::MultisampleTextureFunctionalTestsTextureSizeVertexShadersTest(m_context));
211 }
212 } /* glcts namespace */
213