Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: gpu/command_buffer/service/feature_info_unittest.cc

Issue 2354713004: Implement WEBGL_compressed_texture_es3_0 extension for WebGL 1/2 (Closed)
Patch Set: fixup Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( 442 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
443 GL_COMPRESSED_SRGB_S3TC_DXT1_EXT)); 443 GL_COMPRESSED_SRGB_S3TC_DXT1_EXT));
444 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( 444 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
445 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT)); 445 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT));
446 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( 446 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
447 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT)); 447 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT));
448 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid( 448 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
449 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT)); 449 GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT));
450 } 450 }
451 451
452 TEST_P(FeatureInfoTest, InitializeCHROMIUM_compressed_texture_es3_0) {
453 SetupInitExpectationsWithGLVersion("", "",
454 "OpenGL ES 3.0");
455 EXPECT_THAT(info_->extensions(),
456 HasSubstr("GL_CHROMIUM_compressed_texture_es3_0"));
457 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
458 GL_COMPRESSED_R11_EAC));
459 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
460 GL_COMPRESSED_SIGNED_R11_EAC));
461 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
462 GL_COMPRESSED_RGB8_ETC2));
463 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
464 GL_COMPRESSED_SRGB8_ETC2));
465 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
466 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2));
467 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
468 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2));
469 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
470 GL_COMPRESSED_RG11_EAC));
471 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
472 GL_COMPRESSED_SIGNED_RG11_EAC));
473 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
474 GL_COMPRESSED_RGBA8_ETC2_EAC));
475 EXPECT_TRUE(info_->validators()->compressed_texture_format.IsValid(
476 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC));
477
478 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
479 GL_COMPRESSED_R11_EAC));
480 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
481 GL_COMPRESSED_SIGNED_R11_EAC));
482 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
483 GL_COMPRESSED_RGB8_ETC2));
484 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
485 GL_COMPRESSED_SRGB8_ETC2));
486 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
487 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2));
488 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
489 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2));
490 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
491 GL_COMPRESSED_RG11_EAC));
492 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
493 GL_COMPRESSED_SIGNED_RG11_EAC));
494 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
495 GL_COMPRESSED_RGBA8_ETC2_EAC));
496 EXPECT_TRUE(info_->validators()->texture_internal_format_storage.IsValid(
497 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC));
498 }
499
452 TEST_P(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) { 500 TEST_P(FeatureInfoTest, InitializeEXT_texture_format_BGRA8888GLES2) {
453 SetupInitExpectationsWithGLVersion("GL_EXT_texture_format_BGRA8888", "", 501 SetupInitExpectationsWithGLVersion("GL_EXT_texture_format_BGRA8888", "",
454 "OpenGL ES 2.0"); 502 "OpenGL ES 2.0");
455 EXPECT_THAT(info_->extensions(), 503 EXPECT_THAT(info_->extensions(),
456 HasSubstr("GL_EXT_texture_format_BGRA8888")); 504 HasSubstr("GL_EXT_texture_format_BGRA8888"));
457 EXPECT_TRUE(info_->validators()->texture_format.IsValid( 505 EXPECT_TRUE(info_->validators()->texture_format.IsValid(
458 GL_BGRA_EXT)); 506 GL_BGRA_EXT));
459 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid( 507 EXPECT_TRUE(info_->validators()->texture_internal_format.IsValid(
460 GL_BGRA_EXT)); 508 GL_BGRA_EXT));
461 509
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); 1639 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT));
1592 } 1640 }
1593 1641
1594 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { 1642 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
1595 SetupInitExpectations("GL_APPLE_ycbcr_422"); 1643 SetupInitExpectations("GL_APPLE_ycbcr_422");
1596 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); 1644 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
1597 } 1645 }
1598 1646
1599 } // namespace gles2 1647 } // namespace gles2
1600 } // namespace gpu 1648 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_validation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698