| Index: gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
|
| diff --git a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
|
| index 86b07cd024c4b54f37b54e83ecdd06a763ebb14a..183e3d0ced6df620bc3e6b0f61af74abdc261aaf 100644
|
| --- a/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
|
| +++ b/gpu/command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc
|
| @@ -22,6 +22,12 @@ namespace gpu {
|
|
|
| namespace {
|
|
|
| +enum CopyType { TexImage, TexSubImage };
|
| +const CopyType kCopyTypes[] = {
|
| + TexImage,
|
| + TexSubImage,
|
| +};
|
| +
|
| const uint8 kCompressedImageColor[4] = { 255u, 0u, 0u, 255u };
|
|
|
| // Single compressed ATC block of source pixels all set to:
|
| @@ -51,6 +57,17 @@ const uint8 kCompressedImageDXT5[16] = {
|
| const uint8 kCompressedImageETC1[8] = {
|
| 0x0, 0x0, 0xf8, 0x2, 0xff, 0xff, 0x0, 0x0 };
|
|
|
| +// Single block of zeroes, used for texture pre-allocation.
|
| +const uint8 kInvalidCompressedImage[8] = {
|
| + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
|
| +
|
| +// Four blocks of zeroes, used for texture pre-allocation.
|
| +const uint8 kInvalidCompressedImageLarge[32] = {
|
| + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
| + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
| + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
| + 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
|
| +
|
| void glEnableDisable(GLint param, GLboolean value) {
|
| if (value)
|
| glEnable(param);
|
| @@ -62,7 +79,8 @@ void glEnableDisable(GLint param, GLboolean value) {
|
|
|
| // A collection of tests that exercise the GL_CHROMIUM_copy_texture extension.
|
| class GLCompressedCopyTextureCHROMIUMTest
|
| - : public testing::Test {
|
| + : public testing::Test,
|
| + public ::testing::WithParamInterface<CopyType> {
|
| protected:
|
| void SetUp() override {
|
| gl_.Initialize(GLManager::Options());
|
| @@ -100,14 +118,20 @@ class GLCompressedCopyTextureCHROMIUMTest
|
| GLuint framebuffer_id_;
|
| };
|
|
|
| +INSTANTIATE_TEST_CASE_P(CopyType,
|
| + GLCompressedCopyTextureCHROMIUMTest,
|
| + ::testing::ValuesIn(kCopyTypes));
|
| +
|
| // Test to ensure that the basic functionality of the extension works.
|
| -TEST_F(GLCompressedCopyTextureCHROMIUMTest, Basic) {
|
| +TEST_P(GLCompressedCopyTextureCHROMIUMTest, Basic) {
|
| if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| LOG(INFO) <<
|
| "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| return;
|
| }
|
|
|
| + CopyType copy_type = GetParam();
|
| +
|
| glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| @@ -123,7 +147,17 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, Basic) {
|
| glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| - glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + if (copy_type == TexImage) {
|
| + glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + } else {
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 4, 4, 0,
|
| + sizeof(kInvalidCompressedImage),
|
| + kInvalidCompressedImage);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 0, 4, 4);
|
| + }
|
| EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
|
|
| // Load shader program.
|
| @@ -152,7 +186,9 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, Basic) {
|
| EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
| }
|
|
|
| -TEST_F(GLCompressedCopyTextureCHROMIUMTest, InternalFormat) {
|
| +TEST_P(GLCompressedCopyTextureCHROMIUMTest, InternalFormat) {
|
| + CopyType copy_type = GetParam();
|
| +
|
| struct Image {
|
| const GLint format;
|
| const uint8* data;
|
| @@ -209,18 +245,30 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, InternalFormat) {
|
| glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| - glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + if (copy_type == TexImage) {
|
| + glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1]);
|
| + } else {
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, image->format, 4, 4, 0,
|
| + sizeof(kInvalidCompressedImage),
|
| + kInvalidCompressedImage);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 0, 4, 4);
|
| + }
|
| EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
| }
|
| }
|
|
|
| -TEST_F(GLCompressedCopyTextureCHROMIUMTest, InternalFormatNotSupported) {
|
| +TEST_P(GLCompressedCopyTextureCHROMIUMTest, InternalFormatNotSupported) {
|
| if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| LOG(INFO) <<
|
| "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| return;
|
| }
|
|
|
| + CopyType copy_type = GetParam();
|
| +
|
| const uint8 kUncompressedPixels[1 * 4] = { 255u, 0u, 0u, 255u };
|
|
|
| glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| @@ -239,19 +287,29 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, InternalFormatNotSupported) {
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
|
|
| // Check that the GL_RGBA format reports an error.
|
| - glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + if (copy_type == TexImage) {
|
| + glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + } else {
|
| + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE,
|
| + kUncompressedPixels);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 0, 1, 1);
|
| + }
|
| EXPECT_TRUE(GL_INVALID_OPERATION == glGetError());
|
| }
|
|
|
| // Validate that some basic GL state is not touched upon execution of
|
| // the extension.
|
| -TEST_F(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
|
| +TEST_P(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
|
| if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| LOG(INFO) <<
|
| "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| return;
|
| }
|
|
|
| + CopyType copy_type = GetParam();
|
| +
|
| glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| @@ -268,6 +326,13 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
|
|
| + if (copy_type == TexSubImage) {
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 4, 4, 0,
|
| + sizeof(kInvalidCompressedImage),
|
| + kInvalidCompressedImage);
|
| + }
|
| +
|
| GLboolean reference_settings[2] = { GL_TRUE, GL_FALSE };
|
| for (int x = 0; x < 2; ++x) {
|
| GLboolean setting = reference_settings[x];
|
| @@ -281,7 +346,13 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
|
|
|
| glActiveTexture(GL_TEXTURE1 + x);
|
|
|
| - glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + if (copy_type == TexImage) {
|
| + glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1]);
|
| + } else {
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 0, 4, 4);
|
| + }
|
| EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
|
|
| EXPECT_EQ(setting, glIsEnabled(GL_DEPTH_TEST));
|
| @@ -311,13 +382,15 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, BasicStatePreservation) {
|
|
|
| // Verify that invocation of the extension does not modify the bound
|
| // texture state.
|
| -TEST_F(GLCompressedCopyTextureCHROMIUMTest, TextureStatePreserved) {
|
| +TEST_P(GLCompressedCopyTextureCHROMIUMTest, TextureStatePreserved) {
|
| if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| LOG(INFO) <<
|
| "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| return;
|
| }
|
|
|
| + CopyType copy_type = GetParam();
|
| +
|
| glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| @@ -334,6 +407,13 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, TextureStatePreserved) {
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
|
|
| + if (copy_type == TexSubImage) {
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 4, 4, 0,
|
| + sizeof(kInvalidCompressedImage),
|
| + kInvalidCompressedImage);
|
| + }
|
| +
|
| GLuint texture_ids[2];
|
| glGenTextures(2, texture_ids);
|
|
|
| @@ -343,7 +423,12 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, TextureStatePreserved) {
|
| glActiveTexture(GL_TEXTURE1);
|
| glBindTexture(GL_TEXTURE_2D, texture_ids[1]);
|
|
|
| - glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + if (copy_type == TexImage) {
|
| + glCompressedCopyTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1]);
|
| + } else {
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 0, 4, 4);
|
| + }
|
| EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
|
|
| GLint active_texture = 0;
|
| @@ -366,4 +451,148 @@ TEST_F(GLCompressedCopyTextureCHROMIUMTest, TextureStatePreserved) {
|
| EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
| }
|
|
|
| +TEST_F(GLCompressedCopyTextureCHROMIUMTest, CopySubTextureDimension) {
|
| + if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| + LOG(INFO) <<
|
| + "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| + return;
|
| + }
|
| +
|
| + glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 4, 4, 0,
|
| + sizeof(kCompressedImageDXT1), kCompressedImageDXT1);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + glBindTexture(GL_TEXTURE_2D, textures_[1]);
|
| + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 8, 8, 0,
|
| + sizeof(kInvalidCompressedImageLarge),
|
| + kInvalidCompressedImageLarge);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 1, 1, 0, 0, 1, 1);
|
| + EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
| +
|
| + // xoffset < 0
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1],
|
| + -1, 1, 0, 0, 1, 1);
|
| + EXPECT_TRUE(glGetError() == GL_INVALID_VALUE);
|
| +
|
| + // x < 0
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1],
|
| + 1, 1, -1, 0, 1, 1);
|
| + EXPECT_TRUE(glGetError() == GL_INVALID_VALUE);
|
| +
|
| + // xoffset + width > dest_width
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1],
|
| + 7, 7, 0, 0, 2, 2);
|
| + EXPECT_TRUE(glGetError() == GL_INVALID_VALUE);
|
| +
|
| + // x + width > source_width
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0], textures_[1],
|
| + 0, 0, 3, 3, 2, 2);
|
| + EXPECT_TRUE(glGetError() == GL_INVALID_VALUE);
|
| +}
|
| +
|
| +TEST_F(GLCompressedCopyTextureCHROMIUMTest, CopySubTextureOffset) {
|
| + if (!GLTestHelper::HasExtension("GL_EXT_texture_compression_dxt1")) {
|
| + LOG(INFO) <<
|
| + "GL_EXT_texture_compression_dxt1 not supported. Skipping test...";
|
| + return;
|
| + }
|
| +
|
| + // Four compressed DXT1 blocks solidly colored in red, green, blue and black:
|
| + // [R][G]
|
| + // [B][b]
|
| + const uint8 kRGBImage[32] = {
|
| + 0x0, 0xf8, 0x0, 0xf8, 0xaa, 0xaa, 0xaa, 0xaa,
|
| + 0xe0, 0x7, 0xe0, 0x7, 0xaa, 0xaa, 0xaa, 0xaa,
|
| + 0x1f, 0x0, 0x1f, 0x0, 0xaa, 0xaa, 0xaa, 0xaa,
|
| + 0x0, 0x0, 0x0, 0x0, 0xaa, 0xaa, 0xaa, 0xaa };
|
| +
|
| + glBindTexture(GL_TEXTURE_2D, textures_[0]);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 8, 8, 0,
|
| + sizeof(kRGBImage),
|
| + kRGBImage);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + glBindTexture(GL_TEXTURE_2D, textures_[1]);
|
| + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
| + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| + glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
|
| + 8, 8, 0,
|
| + sizeof(kInvalidCompressedImageLarge),
|
| + kInvalidCompressedImageLarge);
|
| +
|
| + // Copy each block in a clockwise fashion, producing an image like this:
|
| + // [B][R]
|
| + // [b][G]
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 0, 0, 4, 4, 4);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 4, 0, 0, 0, 4, 4);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 4, 4, 4, 0, 4, 4);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + glCompressedCopySubTextureCHROMIUM(GL_TEXTURE_2D, textures_[0],
|
| + textures_[1], 0, 4, 4, 4, 4, 4);
|
| + EXPECT_TRUE(glGetError() == GL_NO_ERROR);
|
| +
|
| + // Load shader program.
|
| + GLuint program = LoadProgram();
|
| + ASSERT_NE(program, 0u);
|
| + GLint position_loc = glGetAttribLocation(program, "a_position");
|
| + GLint texture_loc = glGetUniformLocation(program, "u_texture");
|
| + ASSERT_NE(position_loc, -1);
|
| + ASSERT_NE(texture_loc, -1);
|
| + glUseProgram(program);
|
| +
|
| + // Load geometry.
|
| + GLuint vbo = GLTestHelper::SetupUnitQuad(position_loc);
|
| + ASSERT_NE(vbo, 0u);
|
| +
|
| + // Load texture.
|
| + glActiveTexture(GL_TEXTURE0);
|
| + glBindTexture(GL_TEXTURE_2D, textures_[1]);
|
| + glUniform1i(texture_loc, 0);
|
| +
|
| + // Draw.
|
| + glDrawArrays(GL_TRIANGLES, 0, 6);
|
| + glFlush();
|
| +
|
| + const uint8 kBlack[1 * 4] = {0u, 0u, 0u, 255u};
|
| + const uint8 kRed[1 * 4] = {255u, 0u, 0u, 255u};
|
| + const uint8 kGreen[1 * 4] = {0u, 255u, 0u, 255u};
|
| + const uint8 kBlue[1 * 4] = {0u, 0u, 255u, 255u};
|
| +
|
| + // Note that while destination texture is 8 x 8 pixels the viewport is only
|
| + // 4 x 4.
|
| + GLTestHelper::CheckPixels(0, 0, 2, 2, 0, kBlue);
|
| + GLTestHelper::CheckPixels(2, 0, 2, 2, 0, kRed);
|
| + GLTestHelper::CheckPixels(0, 2, 2, 2, 0, kBlack);
|
| + GLTestHelper::CheckPixels(2, 2, 2, 2, 0, kGreen);
|
| + EXPECT_TRUE(GL_NO_ERROR == glGetError());
|
| +}
|
| +
|
| } // namespace gpu
|
|
|