es3fReadPixelsTests.cpp revision e0f21cf5f2ee3a06c497f32a4392d23e4bbcd573
1/*------------------------------------------------------------------------- 2 * drawElements Quality Program OpenGL ES 3.0 Module 3 * ------------------------------------------------- 4 * 5 * Copyright 2014 The Android Open Source Project 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 Read pixels tests 22 *//*--------------------------------------------------------------------*/ 23 24#include "es3fReadPixelsTests.hpp" 25 26#include "tcuTexture.hpp" 27#include "tcuTextureUtil.hpp" 28#include "tcuImageCompare.hpp" 29#include "tcuTestLog.hpp" 30#include "tcuRenderTarget.hpp" 31 32#include "deRandom.hpp" 33#include "deMath.h" 34#include "deString.h" 35 36#include "gluDefs.hpp" 37#include "gluShaderProgram.hpp" 38#include "gluStrUtil.hpp" 39#include "gluTextureUtil.hpp" 40 41#include <cstring> 42#include <sstream> 43 44#include "glw.h" 45 46using std::vector; 47 48namespace deqp 49{ 50namespace gles3 51{ 52namespace Functional 53{ 54 55namespace 56{ 57 58class ReadPixelsTest : public TestCase 59{ 60public: 61 ReadPixelsTest (Context& context, const char* name, const char* description, bool chooseFormat, int alignment, GLint rowLength, GLint skipRows, GLint skipPixels, GLenum format = GL_RGBA, GLenum type = GL_UNSIGNED_BYTE); 62 63 IterateResult iterate (void); 64 void render (tcu::Texture2D& reference); 65 66private: 67 int m_seed; 68 bool m_chooseFormat; 69 int m_alignment; 70 GLint m_rowLength; 71 GLint m_skipRows; 72 GLint m_skipPixels; 73 GLint m_format; 74 GLint m_type; 75 76 const int m_width; 77 const int m_height; 78 79 void getFormatInfo (tcu::TextureFormat& format, int& pixelSize); 80 void clearColor (tcu::Texture2D& reference, vector<deUint8>& pixelData, int pixelSize); 81}; 82 83ReadPixelsTest::ReadPixelsTest (Context& context, const char* name, const char* description, bool chooseFormat, int alignment, GLint rowLength, GLint skipRows, GLint skipPixels, GLenum format, GLenum type) 84 : TestCase (context, name, description) 85 , m_seed (deStringHash(name)) 86 , m_chooseFormat (chooseFormat) 87 , m_alignment (alignment) 88 , m_rowLength (rowLength) 89 , m_skipRows (skipRows) 90 , m_skipPixels (skipPixels) 91 , m_format (format) 92 , m_type (type) 93 , m_width (13) 94 , m_height (13) 95{ 96} 97 98void ReadPixelsTest::render (tcu::Texture2D& reference) 99{ 100 // Create program 101 const char* vertexSource = 102 "#version 300 es\n" 103 "in mediump vec2 i_coord;\n" 104 "void main (void)\n" 105 "{\n" 106 "\tgl_Position = vec4(i_coord, 0.0, 1.0);\n" 107 "}\n"; 108 109 std::stringstream fragmentSource; 110 111 112 fragmentSource << 113 "#version 300 es\n"; 114 115 if (reference.getFormat().type == tcu::TextureFormat::SIGNED_INT32) 116 fragmentSource << "layout(location = 0) out mediump ivec4 o_color;\n"; 117 else if (reference.getFormat().type == tcu::TextureFormat::UNSIGNED_INT32) 118 fragmentSource << "layout(location = 0) out mediump uvec4 o_color;\n"; 119 else 120 fragmentSource << "layout(location = 0) out mediump vec4 o_color;\n"; 121 122 fragmentSource << 123 "void main (void)\n" 124 "{\n"; 125 126 if (reference.getFormat().type == tcu::TextureFormat::UNSIGNED_INT32) 127 fragmentSource << "\to_color = uvec4(0, 0, 0, 1000);\n"; 128 else if (reference.getFormat().type == tcu::TextureFormat::SIGNED_INT32) 129 fragmentSource << "\to_color = ivec4(0, 0, 0, 1000);\n"; 130 else 131 fragmentSource << "\to_color = vec4(0.0, 0.0, 0.0, 1.0);\n"; 132 133 fragmentSource << 134 "}\n"; 135 136 glu::ShaderProgram program(m_context.getRenderContext(), glu::makeVtxFragSources(vertexSource, fragmentSource.str())); 137 138 m_testCtx.getLog() << program; 139 TCU_CHECK(program.isOk()); 140 GLU_CHECK_CALL(glUseProgram(program.getProgram())); 141 142 // Render 143 { 144 const float coords[] = 145 { 146 -0.5f, -0.5f, 147 0.5f, -0.5f, 148 0.5f, 0.5f, 149 150 0.5f, 0.5f, 151 -0.5f, 0.5f, 152 -0.5f, -0.5f 153 }; 154 GLuint coordLoc; 155 156 coordLoc = glGetAttribLocation(program.getProgram(), "i_coord"); 157 GLU_CHECK_MSG("glGetAttribLocation()"); 158 159 GLU_CHECK_CALL(glEnableVertexAttribArray(coordLoc)); 160 161 GLU_CHECK_CALL(glVertexAttribPointer(coordLoc, 2, GL_FLOAT, GL_FALSE, 0, coords)); 162 163 GLU_CHECK_CALL(glDrawArrays(GL_TRIANGLES, 0, 6)); 164 GLU_CHECK_CALL(glDisableVertexAttribArray(coordLoc)); 165 } 166 167 // Render reference 168 169 const int coordX1 = (int)((-0.5f * reference.getWidth() / 2.0f) + reference.getWidth() / 2.0f); 170 const int coordY1 = (int)((-0.5f * reference.getHeight() / 2.0f) + reference.getHeight() / 2.0f); 171 const int coordX2 = (int)(( 0.5f * reference.getWidth() / 2.0f) + reference.getWidth() / 2.0f); 172 const int coordY2 = (int)(( 0.5f * reference.getHeight() / 2.0f) + reference.getHeight() / 2.0f); 173 174 for (int x = 0; x < reference.getWidth(); x++) 175 { 176 if (x < coordX1 || x > coordX2) 177 continue; 178 179 for (int y = 0; y < reference.getHeight(); y++) 180 { 181 if (y >= coordY1 && y <= coordY2) 182 { 183 if (reference.getFormat().type == tcu::TextureFormat::SIGNED_INT32) 184 reference.getLevel(0).setPixel(tcu::IVec4(0, 0, 0, 1000), x, y); 185 else if (reference.getFormat().type == tcu::TextureFormat::UNSIGNED_INT32) 186 reference.getLevel(0).setPixel(tcu::UVec4(0, 0, 0, 1000), x, y); 187 else 188 reference.getLevel(0).setPixel(tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f), x, y); 189 } 190 } 191 } 192} 193 194void ReadPixelsTest::getFormatInfo (tcu::TextureFormat& format, int& pixelSize) 195{ 196 if (m_chooseFormat) 197 { 198 GLU_CHECK_CALL(glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &m_format)); 199 GLU_CHECK_CALL(glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &m_type)); 200 } 201 202 format = glu::mapGLTransferFormat(m_format, m_type); 203 pixelSize = format.getPixelSize(); 204} 205 206void ReadPixelsTest::clearColor (tcu::Texture2D& reference, vector<deUint8>& pixelData, int pixelSize) 207{ 208 de::Random rnd(m_seed); 209 GLuint framebuffer = 0; 210 GLuint renderbuffer = 0; 211 212 if (m_format == GL_RGBA_INTEGER) 213 { 214 if (m_type == GL_UNSIGNED_INT) 215 { 216 GLU_CHECK_CALL(glGenRenderbuffers(1, &renderbuffer)); 217 GLU_CHECK_CALL(glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer)); 218 GLU_CHECK_CALL(glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA32UI, m_width, m_height)); 219 } 220 else if (m_type == GL_INT) 221 { 222 GLU_CHECK_CALL(glGenRenderbuffers(1, &renderbuffer)); 223 GLU_CHECK_CALL(glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer)); 224 GLU_CHECK_CALL(glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA32I, m_width, m_height)); 225 } 226 else 227 DE_ASSERT(false); 228 229 GLU_CHECK_CALL(glBindRenderbuffer(GL_RENDERBUFFER, 0)); 230 GLU_CHECK_CALL(glGenFramebuffers(1, &framebuffer)); 231 GLU_CHECK_CALL(glBindFramebuffer(GL_FRAMEBUFFER, framebuffer)); 232 GLU_CHECK_CALL(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer)); 233 } 234 else if (m_format == GL_RGBA || m_format == GL_BGRA || m_format == GL_RGB) 235 { 236 // Empty 237 } 238 else 239 DE_ASSERT(false); 240 241 GLU_CHECK_CALL(glViewport(0, 0, reference.getWidth(), reference.getHeight())); 242 243 // Clear color 244 if (m_format == GL_RGBA || m_format == GL_BGRA || m_format == GL_RGB) 245 { 246 const float red = rnd.getFloat(); 247 const float green = rnd.getFloat(); 248 const float blue = rnd.getFloat(); 249 const float alpha = rnd.getFloat(); 250 251 const GLfloat color[] = { red, green, blue, alpha }; 252 // Clear target 253 GLU_CHECK_CALL(glClearColor(red, green, blue, alpha)); 254 m_testCtx.getLog() << tcu::TestLog::Message << "ClearColor: (" << red << ", " << green << ", " << blue << ")" << tcu::TestLog::EndMessage; 255 256 GLU_CHECK_CALL(glClearBufferfv(GL_COLOR, 0, color)); 257 258 tcu::clear(reference.getLevel(0), tcu::Vec4(red, green, blue, alpha)); 259 } 260 else if (m_format == GL_RGBA_INTEGER) 261 { 262 if (m_type == GL_INT) 263 { 264 const GLint red = rnd.getUint32(); 265 const GLint green = rnd.getUint32(); 266 const GLint blue = rnd.getUint32(); 267 const GLint alpha = rnd.getUint32(); 268 269 const GLint color[] = { red, green, blue, alpha }; 270 m_testCtx.getLog() << tcu::TestLog::Message << "ClearColor: (" << red << ", " << green << ", " << blue << ")" << tcu::TestLog::EndMessage; 271 272 GLU_CHECK_CALL(glClearBufferiv(GL_COLOR, 0, color)); 273 274 tcu::clear(reference.getLevel(0), tcu::IVec4(red, green, blue, alpha)); 275 } 276 else if (m_type == GL_UNSIGNED_INT) 277 { 278 const GLuint red = rnd.getUint32(); 279 const GLuint green = rnd.getUint32(); 280 const GLuint blue = rnd.getUint32(); 281 const GLuint alpha = rnd.getUint32(); 282 283 const GLuint color[] = { red, green, blue, alpha }; 284 m_testCtx.getLog() << tcu::TestLog::Message << "ClearColor: (" << red << ", " << green << ", " << blue << ")" << tcu::TestLog::EndMessage; 285 286 GLU_CHECK_CALL(glClearBufferuiv(GL_COLOR, 0, color)); 287 288 tcu::clear(reference.getLevel(0), tcu::UVec4(red, green, blue, alpha)); 289 } 290 else 291 DE_ASSERT(false); 292 } 293 else 294 DE_ASSERT(false); 295 296 render(reference); 297 298 const int rowWidth = (m_rowLength == 0 ? m_width : m_rowLength) + m_skipPixels; 299 const int rowPitch = m_alignment * deCeilFloatToInt32(pixelSize * rowWidth / (float)m_alignment); 300 301 pixelData.resize(rowPitch * (m_height + m_skipRows), 0); 302 303 GLU_CHECK_CALL(glReadPixels(0, 0, m_width, m_height, m_format, m_type, &(pixelData[0]))); 304 305 if (framebuffer) 306 GLU_CHECK_CALL(glDeleteFramebuffers(1, &framebuffer)); 307 308 if (renderbuffer) 309 GLU_CHECK_CALL(glDeleteRenderbuffers(1, &renderbuffer)); 310} 311 312TestCase::IterateResult ReadPixelsTest::iterate (void) 313{ 314 tcu::TextureFormat format(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8); 315 int pixelSize; 316 317 getFormatInfo(format, pixelSize); 318 m_testCtx.getLog() << tcu::TestLog::Message << "Format: " << glu::getPixelFormatStr(m_format) << ", Type: " << glu::getTypeStr(m_type) << tcu::TestLog::EndMessage; 319 320 tcu::Texture2D reference(format, m_width, m_height); 321 reference.allocLevel(0); 322 323 GLU_CHECK_CALL(glPixelStorei(GL_PACK_ALIGNMENT, m_alignment)); 324 m_testCtx.getLog() << tcu::TestLog::Message << "GL_PACK_ALIGNMENT: " << m_alignment << tcu::TestLog::EndMessage; 325 326 GLU_CHECK_CALL(glPixelStorei(GL_PACK_ROW_LENGTH, m_rowLength)); 327 m_testCtx.getLog() << tcu::TestLog::Message << "GL_PACK_ROW_LENGTH: " << m_rowLength << tcu::TestLog::EndMessage; 328 329 GLU_CHECK_CALL(glPixelStorei(GL_PACK_SKIP_ROWS, m_skipRows)); 330 m_testCtx.getLog() << tcu::TestLog::Message << "GL_PACK_SKIP_ROWS: " << m_skipRows << tcu::TestLog::EndMessage; 331 332 GLU_CHECK_CALL(glPixelStorei(GL_PACK_SKIP_PIXELS, m_skipPixels)); 333 m_testCtx.getLog() << tcu::TestLog::Message << "GL_PACK_SKIP_PIXELS: " << m_skipPixels << tcu::TestLog::EndMessage; 334 335 GLU_CHECK_CALL(glViewport(0, 0, m_width, m_height)); 336 337 vector<deUint8> pixelData; 338 clearColor(reference, pixelData, pixelSize); 339 340 const int rowWidth = (m_rowLength == 0 ? m_width : m_rowLength); 341 const int rowPitch = m_alignment * deCeilFloatToInt32(pixelSize * rowWidth / (float)m_alignment); 342 343 // \note GL_RGBA_INTEGER uses always renderbuffers that are never multisampled. Otherwise default framebuffer is used. 344 if (m_format != GL_RGBA_INTEGER && m_context.getRenderTarget().getNumSamples() > 1) 345 { 346 const tcu::IVec4 formatBitDepths = tcu::getTextureFormatBitDepth(format); 347 const deUint8 redThreshold = (deUint8)deCeilFloatToInt32(256.0f * (2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().redBits, formatBitDepths.x())))); 348 const deUint8 greenThreshold = (deUint8)deCeilFloatToInt32(256.0f * (2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().greenBits, formatBitDepths.y())))); 349 const deUint8 blueThreshold = (deUint8)deCeilFloatToInt32(256.0f * (2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().blueBits, formatBitDepths.z())))); 350 const deUint8 alphaThreshold = (deUint8)deCeilFloatToInt32(256.0f * (2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().alphaBits, formatBitDepths.w())))); 351 352 if (tcu::bilinearCompare(m_testCtx.getLog(), "Result", "Result", reference.getLevel(0), tcu::PixelBufferAccess(format, m_width, m_height, 1, rowPitch, 0, &(pixelData[0])), tcu::RGBA(redThreshold, greenThreshold, blueThreshold, alphaThreshold), tcu::COMPARE_LOG_RESULT)) 353 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass"); 354 else 355 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail"); 356 } 357 else 358 { 359 const tcu::IVec4 formatBitDepths = tcu::getTextureFormatBitDepth(format); 360 const float redThreshold = 2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().redBits, formatBitDepths.x())); 361 const float greenThreshold = 2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().greenBits, formatBitDepths.y())); 362 const float blueThreshold = 2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().blueBits, formatBitDepths.z())); 363 const float alphaThreshold = 2.0f / (1 << deMin32(m_context.getRenderTarget().getPixelFormat().alphaBits, formatBitDepths.w())); 364 365 // Compare 366 if (tcu::floatThresholdCompare(m_testCtx.getLog(), "Result", "Result", reference.getLevel(0), tcu::PixelBufferAccess(format, m_width, m_height, 1, rowPitch, 0, &(pixelData[pixelSize * m_skipPixels + m_skipRows * rowPitch])), tcu::Vec4(redThreshold, greenThreshold, blueThreshold, alphaThreshold), tcu::COMPARE_LOG_RESULT)) 367 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass"); 368 else 369 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Fail"); 370 } 371 372 return STOP; 373} 374 375} // anonymous 376 377ReadPixelsTests::ReadPixelsTests (Context& context) 378 : TestCaseGroup(context, "read_pixels", "ReadPixel tests") 379{ 380} 381 382void ReadPixelsTests::init (void) 383{ 384 { 385 TestCaseGroup* group = new TestCaseGroup(m_context, "alignment", "Read pixels pack alignment parameter tests"); 386 387 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_1", "", false, 1, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 388 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_2", "", false, 2, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 389 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_4", "", false, 4, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 390 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_8", "", false, 8, 0, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 391 392 group->addChild(new ReadPixelsTest(m_context, "rgba_int_1", "", false, 1, 0, 0, 0, GL_RGBA_INTEGER, GL_INT)); 393 group->addChild(new ReadPixelsTest(m_context, "rgba_int_2", "", false, 2, 0, 0, 0, GL_RGBA_INTEGER, GL_INT)); 394 group->addChild(new ReadPixelsTest(m_context, "rgba_int_4", "", false, 4, 0, 0, 0, GL_RGBA_INTEGER, GL_INT)); 395 group->addChild(new ReadPixelsTest(m_context, "rgba_int_8", "", false, 8, 0, 0, 0, GL_RGBA_INTEGER, GL_INT)); 396 397 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_1", "", false, 1, 0, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 398 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_2", "", false, 2, 0, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 399 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_4", "", false, 4, 0, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 400 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_8", "", false, 8, 0, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 401 402 group->addChild(new ReadPixelsTest(m_context, "choose_1", "", true, 1, 0, 0, 0)); 403 group->addChild(new ReadPixelsTest(m_context, "choose_2", "", true, 2, 0, 0, 0)); 404 group->addChild(new ReadPixelsTest(m_context, "choose_4", "", true, 4, 0, 0, 0)); 405 group->addChild(new ReadPixelsTest(m_context, "choose_8", "", true, 8, 0, 0, 0)); 406 407 addChild(group); 408 } 409 410 { 411 TestCaseGroup* group = new TestCaseGroup(m_context, "rowlength", "Read pixels rowlength test"); 412 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_17", "", false, 4, 17, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 413 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_19", "", false, 4, 19, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 414 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_23", "", false, 4, 23, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 415 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_29", "", false, 4, 29, 0, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 416 417 group->addChild(new ReadPixelsTest(m_context, "rgba_int_17", "", false, 4, 17, 0, 0, GL_RGBA_INTEGER, GL_INT)); 418 group->addChild(new ReadPixelsTest(m_context, "rgba_int_19", "", false, 4, 19, 0, 0, GL_RGBA_INTEGER, GL_INT)); 419 group->addChild(new ReadPixelsTest(m_context, "rgba_int_23", "", false, 4, 23, 0, 0, GL_RGBA_INTEGER, GL_INT)); 420 group->addChild(new ReadPixelsTest(m_context, "rgba_int_29", "", false, 4, 29, 0, 0, GL_RGBA_INTEGER, GL_INT)); 421 422 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_17", "", false, 4, 17, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 423 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_19", "", false, 4, 19, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 424 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_23", "", false, 4, 23, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 425 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_29", "", false, 4, 29, 0, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 426 427 group->addChild(new ReadPixelsTest(m_context, "choose_17", "", true, 4, 17, 0, 0)); 428 group->addChild(new ReadPixelsTest(m_context, "choose_19", "", true, 4, 19, 0, 0)); 429 group->addChild(new ReadPixelsTest(m_context, "choose_23", "", true, 4, 23, 0, 0)); 430 group->addChild(new ReadPixelsTest(m_context, "choose_29", "", true, 4, 29, 0, 0)); 431 432 addChild(group); 433 } 434 435 { 436 TestCaseGroup* group = new TestCaseGroup(m_context, "skip", "Read pixels skip pixels and rows test"); 437 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_0_3", "", false, 4, 17, 0, 3, GL_RGBA, GL_UNSIGNED_BYTE)); 438 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_3_0", "", false, 4, 17, 3, 0, GL_RGBA, GL_UNSIGNED_BYTE)); 439 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_3_3", "", false, 4, 17, 3, 3, GL_RGBA, GL_UNSIGNED_BYTE)); 440 group->addChild(new ReadPixelsTest(m_context, "rgba_ubyte_3_5", "", false, 4, 17, 3, 5, GL_RGBA, GL_UNSIGNED_BYTE)); 441 442 group->addChild(new ReadPixelsTest(m_context, "rgba_int_0_3", "", false, 4, 17, 0, 3, GL_RGBA_INTEGER, GL_INT)); 443 group->addChild(new ReadPixelsTest(m_context, "rgba_int_3_0", "", false, 4, 17, 3, 0, GL_RGBA_INTEGER, GL_INT)); 444 group->addChild(new ReadPixelsTest(m_context, "rgba_int_3_3", "", false, 4, 17, 3, 3, GL_RGBA_INTEGER, GL_INT)); 445 group->addChild(new ReadPixelsTest(m_context, "rgba_int_3_5", "", false, 4, 17, 3, 5, GL_RGBA_INTEGER, GL_INT)); 446 447 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_0_3", "", false, 4, 17, 0, 3, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 448 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_3_0", "", false, 4, 17, 3, 0, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 449 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_3_3", "", false, 4, 17, 3, 3, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 450 group->addChild(new ReadPixelsTest(m_context, "rgba_uint_3_5", "", false, 4, 17, 3, 5, GL_RGBA_INTEGER, GL_UNSIGNED_INT)); 451 452 group->addChild(new ReadPixelsTest(m_context, "choose_0_3", "", true, 4, 17, 0, 3)); 453 group->addChild(new ReadPixelsTest(m_context, "choose_3_0", "", true, 4, 17, 3, 0)); 454 group->addChild(new ReadPixelsTest(m_context, "choose_3_3", "", true, 4, 17, 3, 3)); 455 group->addChild(new ReadPixelsTest(m_context, "choose_3_5", "", true, 4, 17, 3, 5)); 456 457 addChild(group); 458 } 459} 460 461} // Functional 462} // gles3 463} // deqp 464