• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE3DMULTISAMPLETESTS_HPP
2 #define _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE3DMULTISAMPLETESTS_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2014-2016 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  es31cTextureStorageMultisampleTexStorage3DMultisampleTests.hpp
29  * \brief Declares test classes for glTexStorage3DMultisampleOES() conformance
30  *        tests. (ES3.1 only)
31  */ /*-------------------------------------------------------------------*/
32 
33 #include "es31cTextureStorageMultisampleTests.hpp"
34 
35 namespace glcts
36 {
37 /** Test case: Invalid multisample texture sizes are rejected with GL_INVALID_VALUE error;
38  *             border cases are correctly accepted. */
39 class InvalidTextureSizesAreRejectedValidAreAcceptedTest : public glcts::TestCase
40 {
41 public:
42 	/* Public methods */
43 	InvalidTextureSizesAreRejectedValidAreAcceptedTest(Context& context);
44 
45 	virtual void						 deinit();
46 	virtual tcu::TestNode::IterateResult iterate();
47 
48 private:
49 	/* Private methods */
50 	void initInternals();
51 
52 	/* Private variables */
53 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
54 	glw::GLint	 max_texture_size;
55 	glw::GLint	 max_array_texture_layers;
56 	glw::GLuint	to_id_2d_array_1;
57 	glw::GLuint	to_id_2d_array_2;
58 	glw::GLuint	to_id_2d_array_3;
59 };
60 
61 /** Test case: zero sample requests are rejected by generating glTexStorage3DMultisampleOES() with GL_INVALID_VALUE error */
62 class MultisampleTextureTexStorage3DZeroSampleTest : public glcts::TestCase
63 {
64 public:
65 	/* Public methods */
66 	MultisampleTextureTexStorage3DZeroSampleTest(Context& context);
67 
68 	virtual void						 deinit();
69 	virtual tcu::TestNode::IterateResult iterate();
70 
71 private:
72 	/* Private methods */
73 	void initInternals();
74 
75 	/* Private variables */
76 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
77 	glw::GLuint	to_id;
78 };
79 
80 /** Test case: Requests to set up multisample textures for internal formats that are not color-renderable,
81  *             depth-renderable nor stencil-renderable result in GL_INVALID_ENUM error. */
82 class NonColorDepthStencilRenderableInternalformatsAreRejectedTest : public glcts::TestCase
83 {
84 public:
85 	/* Public methods */
86 	NonColorDepthStencilRenderableInternalformatsAreRejectedTest(Context& context);
87 
88 	virtual void						 deinit();
89 	virtual tcu::TestNode::IterateResult iterate();
90 
91 private:
92 	/* Private methods */
93 	void initInternals();
94 
95 	/* Private variables */
96 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
97 	glw::GLuint	to_id;
98 };
99 
100 /** Test case: Requests to set up multisample color textures with unsupported number of samples
101  *             are rejected with GL_INVALID_OPERATION error. */
102 class RequestsToSetUpMultisampleColorTexturesWithUnsupportedNumberOfSamplesAreRejectedTest : public glcts::TestCase
103 {
104 public:
105 	/* Public methods */
106 	RequestsToSetUpMultisampleColorTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(Context& context);
107 
108 	virtual void						 deinit();
109 	virtual tcu::TestNode::IterateResult iterate();
110 
111 private:
112 	/* Private methods */
113 	void initInternals();
114 
115 	/* Private variables */
116 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
117 	glw::GLuint	to_id;
118 };
119 
120 /** Test case: Requests to set up multisample depth textures with unsupported number of samples
121  *             are rejected with GL_INVALID_OPERATION error. */
122 class RequestsToSetUpMultisampleDepthTexturesWithUnsupportedNumberOfSamplesAreRejectedTest : public glcts::TestCase
123 {
124 public:
125 	/* Public methods */
126 	RequestsToSetUpMultisampleDepthTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(Context& context);
127 
128 	virtual void						 deinit();
129 	virtual tcu::TestNode::IterateResult iterate();
130 
131 private:
132 	/* Private methods */
133 	void initInternals();
134 
135 	/* Private variables */
136 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
137 	glw::GLuint	to_id;
138 };
139 
140 /** Test case: Requests to set up multisample stencil textures with unsupported number of samples
141  *             are rejected with GL_INVALID_OPERATION error. */
142 class RequestsToSetUpMultisampleStencilTexturesWithUnsupportedNumberOfSamplesAreRejectedTest : public glcts::TestCase
143 {
144 public:
145 	/* Public methods */
146 	RequestsToSetUpMultisampleStencilTexturesWithUnsupportedNumberOfSamplesAreRejectedTest(Context& context);
147 
148 	virtual void						 deinit();
149 	virtual tcu::TestNode::IterateResult iterate();
150 
151 private:
152 	/* Private methods */
153 	void initInternals();
154 
155 	/* Private variables */
156 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
157 	glw::GLuint	to_id;
158 };
159 
160 /** Test case: Requests to set up multisample textures using exactly the number of samples reported
161  *            for a particular internal format by glGetI in an GL_INVALID_OPERATION error. */
162 class RequestsToSetUpMultisampleTexturesWithValidAndInvalidNumberOfSamplesTest : public glcts::TestCase
163 {
164 public:
165 	/* Public methods */
166 	RequestsToSetUpMultisampleTexturesWithValidAndInvalidNumberOfSamplesTest(Context& context);
167 
168 	virtual void						 deinit();
169 	virtual tcu::TestNode::IterateResult iterate();
170 
171 private:
172 	/* Private functions and variables */
173 	void createAssets();
174 	void releaseAssets();
175 
176 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
177 	glw::GLuint	to_id;
178 };
179 
180 /** Test case: GL_TEXTURE_2D_MULTISAMPLE texture target is rejected by generating GL_INVALID_ENUM error. */
181 class Texture2DMultisampleTargetIsRejectedTest : public glcts::TestCase
182 {
183 public:
184 	/* Public methods */
185 	Texture2DMultisampleTargetIsRejectedTest(Context& context);
186 
187 	virtual void						 deinit();
188 	virtual tcu::TestNode::IterateResult iterate();
189 
190 private:
191 	/* Private methods */
192 	void initInternals();
193 
194 	/* Private variables */
195 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
196 	glw::GLuint	to_id;
197 };
198 
199 /** Test case: Requests to set up multisample color/depth/stencil textures
200  *             with disabled/enabled fixed sample locations and
201  *             valid internalformats are accepted. */
202 class ValidInternalformatAndSamplesValuesAreAcceptedTest : public glcts::TestCase
203 {
204 public:
205 	/* Public methods */
206 	ValidInternalformatAndSamplesValuesAreAcceptedTest(Context& context);
207 
208 	virtual void						 deinit();
209 	virtual tcu::TestNode::IterateResult iterate();
210 
211 private:
212 	/* Private methods */
213 	void initInternals();
214 
215 	/* Private variables */
216 	glw::GLboolean gl_oes_texture_multisample_2d_array_supported;
217 	glw::GLuint	to_id;
218 };
219 } /* glcts namespace */
220 
221 #endif // _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE3DMULTISAMPLETESTS_HPP
222