Lines Matching refs:test_case

2578 	const testCase&				 test_case							  = m_test_cases[m_test_case_index];
2587 prepareDstPxls(test_case.m_dst, dst_pixels);
2588 prepareSrcPxls(test_case.m_src, test_case.m_dst.m_internal_format, src_pixels);
2591 m_dst_tex_name = prepareTexture(test_case.m_dst, (const GLubyte**)dst_pixels, m_dst_buf_name);
2593 if (GL_RENDERBUFFER == test_case.m_src.m_target)
2595 targetDesc desc = test_case.m_src;
2598 m_rb_name = prepareTexture(test_case.m_src, (const GLubyte**)src_pixels, m_src_buf_name);
2603 m_src_tex_name = prepareTexture(test_case.m_src, (const GLubyte**)src_pixels, m_src_buf_name);
2607 result = copyAndVerify(test_case, (const GLubyte**)dst_pixels, (const GLubyte**)src_pixels);
2697 * @param test_case Test case
2703 bool FunctionalTest::copyAndVerify(const testCase& test_case, const GLubyte** dst_pixels, const GLubyte** src_pixels)
2709 const bool is_dst_multi_layer = Utils::isTargetMultilayer(test_case.m_dst.m_target);
2710 const bool is_src_multi_layer = Utils::isTargetMultilayer(test_case.m_src.m_target);
2747 gl.copyImageSubData(m_src_tex_name, test_case.m_src.m_target, test_case.m_src.m_level,
2748 test_case.m_src_x, test_case.m_src_y, src_layer, m_dst_tex_name,
2749 test_case.m_dst.m_target, test_case.m_dst.m_level, test_case.m_dst_x,
2750 test_case.m_dst_y, dst_layer, test_case.m_width, test_case.m_height, region_depth);
2755 gl.copyImageSubData(m_src_tex_name, GL_TEXTURE_2D, test_case.m_src.m_level, test_case.m_src_x,
2756 test_case.m_src_y, src_layer, m_rb_name, test_case.m_src.m_target,
2757 test_case.m_src.m_level, test_case.m_src_x, test_case.m_src_y, src_layer,
2758 test_case.m_width, test_case.m_height, region_depth);
2760 gl.copyImageSubData(m_rb_name, test_case.m_src.m_target, test_case.m_src.m_level, test_case.m_src_x,
2761 test_case.m_src_y, src_layer, m_dst_tex_name, test_case.m_dst.m_target,
2762 test_case.m_dst.m_level, test_case.m_dst_x, test_case.m_dst_y, dst_layer,
2763 test_case.m_width, test_case.m_height, region_depth);
2772 result = verify(test_case, dst_layer, dst_pixels, src_layer, src_pixels, region_depth);
2779 << "Failure. Targets src: " << glu::getTextureTargetStr(test_case.m_src.m_target)
2780 << ", dst: " << glu::getTextureTargetStr(test_case.m_dst.m_target)
2781 << ". Levels src: " << test_case.m_src.m_level << ", dst: " << test_case.m_dst.m_level
2782 << ". Dimmensions src [" << test_case.m_src.m_width << ", " << test_case.m_src.m_height
2783 << "], dst [" << test_case.m_dst.m_width << ", " << test_case.m_dst.m_height << "]. Region ["
2784 << test_case.m_width << " x " << test_case.m_height << " x " << region_depth << "] from ["
2785 << test_case.m_src_x << ", " << test_case.m_src_y << ", " << src_layer << "] to ["
2786 << test_case.m_dst_x << ", " << test_case.m_dst_y << ", " << dst_layer
2787 << "]. Format src: " << glu::getInternalFormatParameterStr(test_case.m_src.m_internal_format)
2788 << ", dst: " << glu::getInternalFormatParameterStr(test_case.m_dst.m_internal_format)
2975 * @param test_case Test case descriptor
2980 void FunctionalTest::getCleanRegions(const testCase& test_case, GLuint dst_level, GLuint out_regions[4][4],
2989 calculateDimmensions(test_case.m_dst.m_target, dst_level, test_case.m_dst.m_width, test_case.m_dst.m_height,
2994 const GLuint reg_x = test_case.m_dst_x;
2995 const GLuint reg_y = test_case.m_dst_y;
2996 const GLuint reg_w = test_case.m_width;
2997 const GLuint reg_h = test_case.m_height;
3308 testCase test_case = {
3334 test_case.m_dst_x = dst_coord[dst_x];
3335 test_case.m_dst_y = dst_coord[dst_y];
3336 test_case.m_src_x = src_coord[src_x];
3337 test_case.m_src_y = src_coord[src_y];
3339 m_test_cases.push_back(test_case);
3345 test_case.m_dst_x = dst_coord[n_dst_coords - 1];
3346 test_case.m_dst_y = dst_coord[n_dst_coords - 1];
3347 test_case.m_src_x = src_coord[0];
3348 test_case.m_src_y = src_coord[0];
3350 m_test_cases.push_back(test_case);
3357 test_case.m_dst_x = 0;
3358 test_case.m_dst_y = 0;
3359 test_case.m_src_x = 0;
3360 test_case.m_src_y = 0;
3361 test_case.m_width = dst_image_dimmension;
3362 test_case.m_height = dst_image_dimmension;
3364 m_test_cases.push_back(test_case);
3417 * @param test_case Test case
3426 bool FunctionalTest::verify(const testCase& test_case, GLuint dst_layer, const GLubyte** dst_pixels, GLuint src_layer,
3429 const bool is_dst_multi_level = Utils::isTargetMultilevel(test_case.m_dst.m_target);
3430 const bool is_src_multi_level = Utils::isTargetMultilevel(test_case.m_src.m_target);
3431 const GLuint dst_level = test_case.m_dst.m_level;
3433 const GLuint dst_pixel_size = Utils::getPixelSizeForFormat(test_case.m_dst.m_internal_format);
3434 targetDesc src_desc = test_case.m_src;
3454 calculateDimmensions(test_case.m_dst.m_target, dst_level, test_case.m_dst.m_width, test_case.m_dst.m_height,
3513 getPixels(m_dst_tex_name, test_case.m_dst, level, &dst_level_data[0]);
3517 if (false == compareImages(test_case.m_dst, dst_pixels[level], 0, 0, layer, level, test_case.m_dst,
3534 getPixels(m_dst_tex_name, test_case.m_dst, dst_level, &dst_level_data[0]);
3540 if (false == compareImages(test_case.m_dst, dst_pixels[dst_level], 0, 0, layer, dst_level,
3541 test_case.m_dst, &dst_level_data[0], 0, 0, layer, dst_level,
3562 getCleanRegions(test_case, dst_level, regions, n_regions);
3571 if (false == compareImages(test_case.m_dst, dst_pixels[dst_level], x, y, layer + dst_layer,
3572 dst_level, test_case.m_dst, &dst_level_data[0], x, y, layer + dst_layer,
3585 if (false == compareImages(test_case.m_dst, &dst_level_data[0], test_case.m_dst_x, test_case.m_dst_y,
3586 layer + dst_layer, dst_level, src_desc, src_pixels[src_level], test_case.m_src_x,
3587 test_case.m_src_y, layer + src_layer, src_level, test_case.m_width,
3588 test_case.m_height))
3631 const testCase test_case = { target, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT };
3633 m_test_cases.push_back(test_case);
3643 const testCase test_case = { GL_TEXTURE_2D, internal_format, format, type };
3645 m_test_cases.push_back(test_case);
3698 * @param test_case Test case descriptor
3704 bool SmokeTest::compareImages(const testCase& test_case, const GLubyte* left_data, const GLubyte* right_data) const
3708 const GLuint pixel_size = Utils::getPixelSizeForFormat(test_case.m_internal_format);
3713 if ((GL_TEXTURE_1D == test_case.m_target) || (GL_TEXTURE_1D_ARRAY == test_case.m_target))
3742 test_case.m_format, test_case.m_type, test_case.m_internal_format, left_pixel_data,
3743 test_case.m_format, test_case.m_type, test_case.m_internal_format, right_pixel_data))
3748 << ". Data left: " << Utils::getPixelString(test_case.m_internal_format, left_pixel_data)
3749 << ", right: " << Utils::getPixelString(test_case.m_internal_format, right_pixel_data)
3763 * @param test_case Test case
3768 bool SmokeTest::copyAndVerify(const testCase& test_case, const GLubyte* src_pixels)
3780 if ((GL_TEXTURE_1D == test_case.m_target) || (GL_TEXTURE_1D_ARRAY == test_case.m_target))
3785 gl.copyImageSubData(m_src_tex_name, test_case.m_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
3786 0 /* srcZ */, m_dst_tex_name, test_case.m_target, 0 /* dstLevel */, 0 /* dstX */,
3793 0 /* srcZ */, m_rb_name, test_case.m_target, 0 /* dstLevel */, 0 /* dstX */,
3796 gl.copyImageSubData(m_rb_name, test_case.m_target, 0 /* dstLevel */, 0 /* dstX */, 0 /* dstY */,
3807 result = verify(test_case, src_pixels);
3813 << tcu::TestLog::Message << "Failure. Target: " << glu::getTextureTargetStr(test_case.m_target)
3814 << ". Format: " << glu::getInternalFormatParameterStr(test_case.m_internal_format)
3836 * @param test_case Test case descriptor
3839 void SmokeTest::getPixels(GLuint name, const SmokeTest::testCase& test_case, GLubyte* out_pixels) const
3842 GLenum tgt_bind = test_case.m_target;
3843 GLenum tgt_get = test_case.m_target;
3845 if (GL_RENDERBUFFER == test_case.m_target)
3850 else if (GL_TEXTURE_CUBE_MAP == test_case.m_target)
3858 gl.getTexImage(tgt_get, 0 /* level */, test_case.m_format, test_case.m_type, out_pixels);
3876 const testCase& test_case = m_test_cases[m_test_case_index];
3885 prepareDstPxls(test_case, dst_pixels);
3886 prepareSrcPxls(test_case, src_pixels);
3889 if (GL_RENDERBUFFER == test_case.m_target)
3891 testCase desc = test_case;
3896 m_rb_name = prepareTexture(test_case, 0 /* pixels */, ignored /* buffer name */);
3902 m_dst_tex_name = prepareTexture(test_case, dst_pixels, m_dst_buf_name);
3903 m_src_tex_name = prepareTexture(test_case, src_pixels, m_src_buf_name);
3907 result = copyAndVerify(test_case, src_pixels);
3949 * @param test_case Test case descriptor
3952 void SmokeTest::prepareDstPxls(const SmokeTest::testCase& test_case, GLubyte*& out_pixels) const
3956 const GLenum internal_format = test_case.m_internal_format;
3957 const GLuint n_layers = (GL_TEXTURE_CUBE_MAP_ARRAY != test_case.m_target) ? m_depth : 6;
3961 const GLenum type = test_case.m_type;
3984 * @param test_case Test case descriptor
3987 void SmokeTest::prepareSrcPxls(const SmokeTest::testCase& test_case, GLubyte*& out_pixels) const
3991 const GLenum internal_format = test_case.m_internal_format;
3992 const GLuint n_layers = (GL_TEXTURE_CUBE_MAP_ARRAY != test_case.m_target) ? m_depth : 6;
3998 const GLenum type = test_case.m_type;
4049 GLuint SmokeTest::prepareTexture(const testCase& test_case, const GLubyte* pixels, GLuint& out_buf_id)
4051 const GLuint n_layers = (GL_TEXTURE_CUBE_MAP_ARRAY != test_case.m_target) ? m_depth : 6;
4052 GLuint name = Utils::generateTexture(m_context, test_case.m_target);
4054 Utils::prepareTexture(m_context, name, test_case.m_target, test_case.m_internal_format, test_case.m_format,
4055 test_case.m_type, 0 /* level */, m_width, m_height, n_layers, pixels, out_buf_id);
4057 Utils::makeTextureComplete(m_context, test_case.m_target, name, 0 /* base */, 0 /* max */);
4064 * @param test_case Test case
4069 bool SmokeTest::verify(const testCase& test_case, const GLubyte* src_pixels)
4072 const GLuint n_layers = (GL_TEXTURE_CUBE_MAP_ARRAY != test_case.m_target) ? m_depth : 6;
4073 const GLuint pixel_size = Utils::getPixelSizeForFormat(test_case.m_internal_format);
4084 getPixels(m_src_tex_name, test_case, &src_data[0]);
4086 if (false == compareImages(test_case, src_pixels, &src_data[0]))
4097 getPixels(m_dst_tex_name, test_case, &dst_data[0]);
4099 if (false == compareImages(test_case, src_pixels, &dst_data[0]))
4135 testCase test_case = { src_target, dst_target, GL_NO_ERROR };
4139 test_case.m_expected_result = GL_INVALID_OPERATION;
4142 m_test_cases.push_back(test_case);
4153 const testCase test_case = { src_target, dst_target, GL_INVALID_ENUM };
4155 m_test_cases.push_back(test_case);
4166 const testCase test_case = { src_target, dst_target, GL_INVALID_ENUM };
4168 m_test_cases.push_back(test_case);
4179 const testCase test_case = { src_target, dst_target, GL_INVALID_ENUM };
4181 m_test_cases.push_back(test_case);
4196 const testCase& test_case = m_test_cases[m_test_case_index];
4201 m_dst_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_dst_target, GL_RGBA8, GL_RGBA,
4203 m_src_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_src_target, GL_RGBA8, GL_RGBA,
4207 Utils::makeTextureComplete(m_context, test_case.m_dst_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
4208 Utils::makeTextureComplete(m_context, test_case.m_src_target, m_src_tex_name, 0 /* base */, 0 /* max */);
4217 gl.copyImageSubData(m_src_tex_name, test_case.m_src_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
4218 0 /* srcZ */, m_dst_tex_name, test_case.m_dst_target, 0 /* dstLevel */, 0 /* dstX */,
4223 result = (test_case.m_expected_result == error);
4245 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
4247 << ". Source target: " << glu::getTextureTargetStr(test_case.m_src_target)
4248 << ", destination target: " << glu::getTextureTargetStr(test_case.m_dst_target) << tcu::TestLog::EndMessage;
4263 const testCase& test_case = m_test_cases[m_test_case_index];
4266 Utils::deleteTexture(m_context, test_case.m_dst_target, m_dst_tex_name);
4267 Utils::deleteTexture(m_context, test_case.m_src_target, m_src_tex_name);
4308 testCase test_case = { tex_target, src_target, dst_target, GL_INVALID_ENUM };
4319 test_case.m_expected_result = GL_NO_ERROR;
4328 m_test_cases.push_back(test_case);
4340 testCase test_case = { tex_target, src_target, dst_target, GL_INVALID_ENUM };
4351 test_case.m_expected_result = GL_NO_ERROR;
4360 m_test_cases.push_back(test_case);
4375 const testCase& test_case = m_test_cases[m_test_case_index];
4380 m_dst_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA,
4382 m_src_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA,
4386 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
4387 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
4396 gl.copyImageSubData(m_src_tex_name, test_case.m_src_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
4397 0 /* srcZ */, m_dst_tex_name, test_case.m_dst_target, 0 /* dstLevel */, 0 /* dstX */,
4402 result = (test_case.m_expected_result == error);
4423 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
4425 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target)
4426 << ". Source target: " << glu::getTextureTargetStr(test_case.m_src_target)
4427 << ", destination target: " << glu::getTextureTargetStr(test_case.m_dst_target) << tcu::TestLog::EndMessage;
4481 testCase test_case = { tex_target, false, false, GL_INVALID_OPERATION };
4489 m_test_cases.push_back(test_case);
4491 test_case.m_is_dst_complete = true;
4492 test_case.m_is_src_complete = false;
4493 m_test_cases.push_back(test_case);
4495 test_case.m_is_dst_complete = false;
4496 test_case.m_is_src_complete = true;
4497 m_test_cases.push_back(test_case);
4499 test_case.m_is_dst_complete = true;
4500 test_case.m_is_src_complete = true;
4501 test_case.m_expected_result = GL_NO_ERROR;
4502 m_test_cases.push_back(test_case);
4516 const testCase& test_case = m_test_cases[m_test_case_index];
4521 m_dst_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA,
4523 m_src_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA,
4527 if (true == test_case.m_is_dst_complete)
4529 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
4532 if (true == test_case.m_is_src_complete)
4534 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
4544 gl.copyImageSubData(m_src_tex_name, test_case.m_tex_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
4545 0 /* srcZ */, m_dst_tex_name, test_case.m_tex_target, 0 /* dstLevel */, 0 /* dstX */,
4550 result = (test_case.m_expected_result == error);
4571 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
4573 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target)
4574 << ". Is source complete: " << test_case.m_is_src_complete
4575 << ", is destination complete: " << test_case.m_is_dst_complete << tcu::TestLog::EndMessage;
4631 testCase test_case = { tex_target, GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE,
4640 m_test_cases.push_back(test_case);
4648 testCase test_case = { tex_target, GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE,
4657 m_test_cases.push_back(test_case);
4665 testCase test_case = { tex_target, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT,
4674 m_test_cases.push_back(test_case);
4682 testCase test_case = { tex_target, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT,
4691 m_test_cases.push_back(test_case);
4699 testCase test_case = { tex_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE,
4708 m_test_cases.push_back(test_case);
4722 const testCase& test_case = m_test_cases[m_test_case_index];
4727 m_dst_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, test_case.m_dst_internal_format,
4728 test_case.m_dst_format, test_case.m_dst_type, m_dst_buf_name);
4729 m_src_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, test_case.m_src_internal_format,
4730 test_case.m_src_format, test_case.m_src_type, m_src_buf_name);
4733 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
4734 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
4743 gl.copyImageSubData(m_src_tex_name, test_case.m_tex_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
4744 0 /* srcZ */, m_dst_tex_name, test_case.m_tex_target, 0 /* dstLevel */, 0 /* dstX */,
4749 result = (test_case.m_expected_result == error);
4770 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
4772 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target)
4773 << ". Source format: " << glu::getInternalFormatParameterStr(test_case.m_src_internal_format)
4774 << ". Destination format: " << glu::getInternalFormatParameterStr(test_case.m_dst_internal_format)
4790 const testCase& test_case = m_test_cases[m_test_case_index];
4793 Utils::deleteTexture(m_context, test_case.m_tex_target, m_dst_tex_name);
4794 Utils::deleteTexture(m_context, test_case.m_tex_target, m_src_tex_name);
4824 testCase test_case;
4838 test_case.m_src_target = targets[src_target];
4839 test_case.m_src_n_samples = n_samples[src_sample];
4840 test_case.m_dst_target = targets[dst_target];
4841 test_case.m_dst_n_samples = n_samples[dst_sample];
4843 if (test_case.m_src_n_samples == test_case.m_dst_n_samples)
4845 test_case.m_expected_result = GL_NO_ERROR;
4849 test_case.m_expected_result = GL_INVALID_OPERATION;
4852 m_test_cases.push_back(test_case);
4869 const testCase& test_case = m_test_cases[m_test_case_index];
4874 m_dst_tex_name = Utils::prepareMultisampleTex(m_context, test_case.m_dst_target, test_case.m_dst_n_samples);
4875 m_src_tex_name = Utils::prepareMultisampleTex(m_context, test_case.m_src_target, test_case.m_src_n_samples);
4883 GLenum expected_result = test_case.m_expected_result;
4885 if (test_case.m_dst_n_samples > 0 && test_case.m_src_n_samples > 0)
4893 gl.bindTexture(test_case.m_dst_target, m_dst_tex_name);
4894 gl.getTexLevelParameteriv(test_case.m_dst_target, 0, GL_TEXTURE_SAMPLES, &num_dst_samples);
4895 gl.bindTexture(test_case.m_src_target, m_src_tex_name);
4896 gl.getTexLevelParameteriv(test_case.m_src_target, 0, GL_TEXTURE_SAMPLES, &num_src_samples);
4897 if (num_dst_samples != test_case.m_dst_n_samples || num_src_samples != test_case.m_src_n_samples)
4903 if (test_case.m_dst_n_samples != test_case.m_src_n_samples && num_dst_samples == num_src_samples)
4907 else if (test_case.m_dst_n_samples == test_case.m_src_n_samples && num_dst_samples != num_src_samples)
4915 gl.copyImageSubData(m_src_tex_name, test_case.m_src_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
4916 0 /* srcZ */, m_dst_tex_name, test_case.m_dst_target, 0 /* dstLevel */, 0 /* dstX */,
4945 << ". Source target: " << glu::getTextureTargetStr(test_case.m_src_target)
4946 << " samples: " << test_case.m_src_n_samples
4947 << ", destination target: " << glu::getTextureTargetStr(test_case.m_dst_target)
4948 << " samples: " << test_case.m_dst_n_samples << tcu::TestLog::EndMessage;
5004 testCase test_case = {
5009 m_test_cases.push_back(test_case);
5014 testCase test_case = {
5019 m_test_cases.push_back(test_case);
5035 const testCase& test_case = m_test_cases[m_test_case_index];
5040 m_dst_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, test_case.m_dst_internal_format,
5041 test_case.m_dst_format, test_case.m_dst_type, temp);
5042 m_src_tex_name = Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, test_case.m_src_internal_format,
5043 test_case.m_src_format, test_case.m_src_type, temp);
5046 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
5047 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
5056 gl.copyImageSubData(m_src_tex_name, test_case.m_tex_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */,
5057 0 /* srcZ */, m_dst_tex_name, test_case.m_tex_target, 0 /* dstLevel */, 0 /* dstX */,
5062 result = (test_case.m_expected_result == error);
5083 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
5085 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target)
5086 << ". Source format: " << glu::getInternalFormatParameterStr(test_case.m_src_internal_format)
5087 << ". Destination format: " << glu::getInternalFormatParameterStr(test_case.m_dst_internal_format)
5141 const testCase test_case = { arg_types[dst], !!dst_valid, arg_types[src], !!src_valid,
5144 m_test_cases.push_back(test_case);
5162 const testCase& test_case = m_test_cases[m_test_case_index];
5167 if (GL_RENDERBUFFER == test_case.m_dst_target)
5174 Utils::prepareTex16x16x6(m_context, test_case.m_dst_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5177 Utils::makeTextureComplete(m_context, test_case.m_dst_target, m_dst_name, 0 /* base */, 0 /* max */);
5180 if (GL_RENDERBUFFER == test_case.m_src_target)
5187 Utils::prepareTex16x16x6(m_context, test_case.m_src_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5190 Utils::makeTextureComplete(m_context, test_case.m_src_target, m_src_name, 0 /* base */, 0 /* max */);
5194 if (!test_case.m_dst_valid)
5196 Utils::deleteTexture(m_context, test_case.m_dst_target, m_dst_name);
5199 if (!test_case.m_src_valid)
5201 Utils::deleteTexture(m_context, test_case.m_src_target, m_src_name);
5211 gl.copyImageSubData(m_src_name, test_case.m_src_target, 0 /* srcLevel */, 0 /* srcX */, 0 /* srcY */, 0 /* srcZ */,
5212 m_dst_name, test_case.m_dst_target, 0 /* dstLevel */, 0 /* dstX */, 0 /* dstY */, 0 /* dstZ */,
5217 result = (test_case.m_expected_result == error);
5238 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
5240 << ". Destination target: " << glu::getTextureTargetStr(test_case.m_dst_target)
5241 << ". Destination valid: " << (test_case.m_src_valid ? "true" : "false")
5242 << ". Source target: " << glu::getTextureTargetStr(test_case.m_dst_target)
5243 << ". Source valid: " << (test_case.m_dst_valid ? "true" : "false") << "." << tcu::TestLog::EndMessage;
5258 const testCase& test_case = m_test_cases[m_test_case_index];
5261 if (test_case.m_dst_valid)
5263 if (GL_RENDERBUFFER == test_case.m_dst_target)
5272 if (test_case.m_src_valid)
5274 if (GL_RENDERBUFFER == test_case.m_src_target)
5303 testCase test_case = { tex_target, 0, 0, GL_NO_ERROR };
5310 m_test_cases.push_back(test_case);
5313 test_case.m_expected_result = GL_INVALID_VALUE;
5315 test_case.m_dst_level = 1;
5316 test_case.m_src_level = 0;
5317 m_test_cases.push_back(test_case);
5319 test_case.m_dst_level = 0;
5320 test_case.m_src_level = 1;
5321 m_test_cases.push_back(test_case);
5323 test_case.m_dst_level = 1;
5324 test_case.m_src_level = 1;
5325 m_test_cases.push_back(test_case);
5340 const testCase& test_case = m_test_cases[m_test_case_index];
5346 Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5348 Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5351 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
5352 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
5361 gl.copyImageSubData(m_src_tex_name, test_case.m_tex_target, test_case.m_src_level, 0 /* srcX */, 0 /* srcY */,
5362 0 /* srcZ */, m_dst_tex_name, test_case.m_tex_target, test_case.m_dst_level, 0 /* dstX */,
5367 result = (test_case.m_expected_result == error);
5389 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
5391 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target)
5392 << ", source level: " << test_case.m_src_level << ", destination level: " << test_case.m_dst_level
5513 const testCase& test_case = m_test_cases[m_test_case_index];
5519 Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5521 Utils::prepareTex16x16x6(m_context, test_case.m_tex_target, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, temp);
5524 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_dst_tex_name, 0 /* base */, 0 /* max */);
5525 Utils::makeTextureComplete(m_context, test_case.m_tex_target, m_src_tex_name, 0 /* base */, 0 /* max */);
5534 gl.copyImageSubData(m_src_tex_name, test_case.m_tex_target, 0 /* level */, test_case.m_src_x /* srcX */,
5535 test_case.m_src_y /* srcY */, test_case.m_src_z /* srcZ */, m_dst_tex_name,
5536 test_case.m_tex_target, 0 /* level */, test_case.m_dst_x /* dstX */,
5537 test_case.m_dst_y /* dstY */, test_case.m_dst_z /* dstZ */, m_region_width /* srcWidth */,
5538 test_case.m_height /* srcHeight */, test_case.m_depth /* srcDepth */);
5542 result = (test_case.m_expected_result == error);
5564 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
5566 << ". Texture target: " << glu::getTextureTargetStr(test_case.m_tex_target) << ", source: ["
5567 << test_case.m_src_x << ", " << test_case.m_src_y << ", " << test_case.m_src_z << "], destination: ["
5568 << test_case.m_src_x << ", " << test_case.m_src_y << ", " << test_case.m_src_z
5569 << "], depth: " << test_case.m_depth << tcu::TestLog::EndMessage;
5583 const testCase& test_case = m_test_cases[m_test_case_index];
5586 Utils::deleteTexture(m_context, test_case.m_tex_target, m_dst_tex_name);
5587 Utils::deleteTexture(m_context, test_case.m_tex_target, m_src_tex_name);
5662 const testCase& test_case = m_test_cases[m_test_case_index];
5683 gl.copyImageSubData(m_src_tex_name, GL_TEXTURE_2D, 0 /* level */, test_case.m_src_x /* srcX */,
5684 test_case.m_src_y /* srcY */, 0 /* srcZ */, m_dst_tex_name, GL_TEXTURE_2D, 0 /* level */,
5685 test_case.m_dst_x /* dstX */, test_case.m_dst_y /* dstY */, 0 /* dstZ */,
5686 test_case.m_width /* srcWidth */, test_case.m_height /* srcHeight */, 1 /* srcDepth */);
5690 result = (test_case.m_expected_result == error);
5712 << tcu::TestLog::Message << "Failure. Expected result: " << glu::getErrorStr(test_case.m_expected_result)
5713 << " got: " << glu::getErrorStr(error) << ". source: [" << test_case.m_src_x << ", " << test_case.m_src_y
5714 << "], destination: [" << test_case.m_src_x << ", " << test_case.m_src_y << "], size: " << test_case.m_width
5715 << " x " << test_case.m_height << tcu::TestLog::EndMessage;
5768 const testCase& test_case = testCases[m_test_case_index];
5771 m_dst_tex_name = createTexture(width, height, test_case.m_internal_format, test_case.m_type, &data_buf[0],
5774 m_src_tex_name = createTexture(width, height, test_case.m_internal_format, test_case.m_type, &data_buf[0],
5817 << ". Texture internal format: " << glu::getTextureFormatStr(test_case.m_internal_format)