1 #ifndef _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE2DMULTISAMPLETESTS_HPP 2 #define _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE2DMULTISAMPLETESTS_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 es31cTextureStorageMultisampleTexStorage2DMultisampleTests.hpp 29 * \brief Declares test classes for glTexStorage2DMultisample() conformance 30 * tests. (ES3.1 only) 31 */ /*-------------------------------------------------------------------*/ 32 33 #include "es31cTextureStorageMultisampleTests.hpp" 34 35 namespace glcts 36 { 37 /** Test case: glTexStorage2DMultisample() requests to set up multisample textures using exactly the number of samples reported for a particular 38 * internal format by glGetInternalformativ() function should succeed. Using larger values should result in an GL_INVALID_OPERATION error. */ 39 class MultisampleTextureTexStorage2DGeneralSamplesNumberTest : public glcts::TestCase 40 { 41 public: 42 /* Public methods */ 43 MultisampleTextureTexStorage2DGeneralSamplesNumberTest(Context& context); 44 45 virtual void deinit(); 46 virtual void deinitInternalIteration(); 47 virtual void initInternalIteration(); 48 virtual tcu::TestNode::IterateResult iterate(); 49 50 private: 51 /* Private methods and variables */ 52 glw::GLuint to_id; 53 }; 54 55 /** Test case: Invalid multisample texture sizes are rejected; border cases are correctly accepted. */ 56 class MultisampleTextureTexStorage2DInvalidAndBorderCaseTextureSizesTest : public glcts::TestCase 57 { 58 public: 59 /* Public methods */ 60 MultisampleTextureTexStorage2DInvalidAndBorderCaseTextureSizesTest(Context& context); 61 62 virtual void deinit(); 63 virtual tcu::TestNode::IterateResult iterate(); 64 65 private: 66 /* Private methods */ 67 void initInternals(); 68 69 /* Private variables */ 70 glw::GLuint to_id; 71 }; 72 73 /** Test case: Requests to set up multisample textures for internal formats that are not color-renderable, depth-renderable and stencil-renderable result in GL_INVALID_ENUM error */ 74 class MultisampleTextureTexStorage2DNonColorDepthOrStencilInternalFormatsTest : public glcts::TestCase 75 { 76 public: 77 /* Public methods */ 78 MultisampleTextureTexStorage2DNonColorDepthOrStencilInternalFormatsTest(Context& context); 79 80 virtual void deinit(); 81 virtual void deinitInternalIteration(); 82 virtual void initInternalIteration(); 83 virtual tcu::TestNode::IterateResult iterate(); 84 85 private: 86 /* Private variables */ 87 glw::GLuint to_id; 88 }; 89 90 /** Test case: reconfiguration of immutable 2D texture storage is forbidden and should result in GL_INVALID_OPERATION error. */ 91 class MultisampleTextureTexStorage2DReconfigurationRejectedTest : public glcts::TestCase 92 { 93 public: 94 /* Public methods */ 95 MultisampleTextureTexStorage2DReconfigurationRejectedTest(Context& context); 96 97 virtual void deinit(); 98 virtual void deinitTexture(glw::GLuint& to_id, glw::GLenum texture_target); 99 virtual void initTexture(glw::GLuint& to_id, glw::GLenum texture_target); 100 virtual tcu::TestNode::IterateResult iterate(); 101 102 private: 103 /* Private methods */ 104 void initInternals(); 105 106 /* Private variables */ 107 glw::GLboolean gl_oes_texture_storage_multisample_2d_array_supported; 108 glw::GLuint to_id_2d; 109 glw::GLuint to_id_2d_array; 110 }; 111 112 /** Test case: GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES texture target is rejected and GL_INVALID_ENUM error code set */ 113 class MultisampleTextureTexStorage2DTexture2DMultisampleArrayTest : public glcts::TestCase 114 { 115 public: 116 /* Public methods */ 117 MultisampleTextureTexStorage2DTexture2DMultisampleArrayTest(Context& context); 118 119 virtual tcu::TestNode::IterateResult iterate(); 120 121 private: 122 /* Private methods */ 123 void initInternals(); 124 }; 125 126 /** Test case: Requests to set up multisample color textures with unsupported number of samples are rejected with GL_INVALID_OPERATION error */ 127 class MultisampleTextureTexStorage2DUnsupportedSamplesCountForColorTexturesTest : public glcts::TestCase 128 { 129 public: 130 /* Public methods */ 131 MultisampleTextureTexStorage2DUnsupportedSamplesCountForColorTexturesTest(Context& context); 132 133 virtual void deinit(); 134 virtual void deinitInternalIteration(); 135 virtual void initInternalIteration(); 136 virtual tcu::TestNode::IterateResult iterate(); 137 138 private: 139 /* Private variables */ 140 glw::GLuint to_id; 141 }; 142 143 /** Test case: Requests to set up multisample depth textures with unsupported number of samples are rejected with GL_INVALID_OPERATION error */ 144 class MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthTexturesTest : public glcts::TestCase 145 { 146 public: 147 /* Public methods */ 148 MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthTexturesTest(Context& context); 149 150 virtual void deinit(); 151 virtual void deinitInternalIteration(); 152 virtual void initInternalIteration(); 153 virtual tcu::TestNode::IterateResult iterate(); 154 155 private: 156 /* Private variables */ 157 glw::GLuint to_id; 158 }; 159 160 /** Test case: Requests to set up multisample depth+stencil textures with unsupported number of samples are rejected with GL_INVALID_OPERATION error */ 161 class MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthStencilTexturesTest : public glcts::TestCase 162 { 163 public: 164 /* Public methods */ 165 MultisampleTextureTexStorage2DUnsupportedSamplesCountForDepthStencilTexturesTest(Context& context); 166 167 virtual void deinit(); 168 virtual void deinitInternalIteration(); 169 virtual void initInternalIteration(); 170 virtual tcu::TestNode::IterateResult iterate(); 171 172 private: 173 /* Private variables */ 174 glw::GLuint to_id; 175 }; 176 177 /** Test case: Requests to set up multisample color/depth/stencil textures are accepted. */ 178 class MultisampleTextureTexStorage2DValidCallsTest : public glcts::TestCase 179 { 180 public: 181 /* Public methods */ 182 MultisampleTextureTexStorage2DValidCallsTest(Context& context); 183 184 virtual void deinit(); 185 virtual tcu::TestNode::IterateResult iterate(); 186 187 private: 188 /* Private methods */ 189 void initInternals(); 190 191 /* Private variables */ 192 glw::GLuint to_id; 193 }; 194 195 /** Test case: zero sample requests are rejected by generating a GL_INVALID_VALUE error. */ 196 class MultisampleTextureTexStorage2DZeroSampleTest : public glcts::TestCase 197 { 198 public: 199 /* Public methods */ 200 MultisampleTextureTexStorage2DZeroSampleTest(Context& context); 201 202 virtual void deinit(); 203 virtual tcu::TestNode::IterateResult iterate(); 204 205 private: 206 /* Private methods */ 207 void initInternals(); 208 209 /* Private variables */ 210 glw::GLuint to_id; 211 }; 212 213 } /* glcts namespace */ 214 215 #endif // _ES31CTEXTURESTORAGEMULTISAMPLETEXSTORAGE2DMULTISAMPLETESTS_HPP 216