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

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

Issue 2678483003: Fix EXT_draw_buffers detection on some GL ES 3 contexts (Closed)
Patch Set: update tests Created 3 years, 10 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 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1522 } 1522 }
1523 1523
1524 TEST_P(FeatureInfoTest, InitializeWithNVFence) { 1524 TEST_P(FeatureInfoTest, InitializeWithNVFence) {
1525 SetupInitExpectations("GL_NV_fence"); 1525 SetupInitExpectations("GL_NV_fence");
1526 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1526 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1527 EXPECT_TRUE(gl::GLFence::IsSupported()); 1527 EXPECT_TRUE(gl::GLFence::IsSupported());
1528 } 1528 }
1529 1529
1530 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) { 1530 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) {
1531 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0"); 1531 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0");
1532 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers); 1532 bool is_es2 = GetContextType() == CONTEXT_TYPE_OPENGLES2;
1533 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers); 1533 EXPECT_EQ(is_es2, info_->feature_flags().nv_draw_buffers);
1534 EXPECT_EQ(is_es2, info_->feature_flags().ext_draw_buffers);
1534 } 1535 }
1535 1536
1536 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) { 1537 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) {
1537 SetupInitExpectationsWithGLVersion( 1538 SetupInitExpectationsWithGLVersion(
1538 "GL_NV_draw_buffers GL_EXT_draw_buffers", "", "OpenGL ES 3.0"); 1539 "GL_NV_draw_buffers GL_EXT_draw_buffers", "", "OpenGL ES 3.0");
1540 bool is_es2 = GetContextType() == CONTEXT_TYPE_OPENGLES2;
1539 EXPECT_FALSE(info_->feature_flags().nv_draw_buffers); 1541 EXPECT_FALSE(info_->feature_flags().nv_draw_buffers);
1540 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers); 1542 EXPECT_EQ(is_es2, info_->feature_flags().ext_draw_buffers);
1541 } 1543 }
1542 1544
1543 TEST_P(FeatureInfoTest, BlendEquationAdvancedDisabled) { 1545 TEST_P(FeatureInfoTest, BlendEquationAdvancedDisabled) {
1544 base::CommandLine command_line(0, NULL); 1546 base::CommandLine command_line(0, NULL);
1545 command_line.AppendSwitchASCII( 1547 command_line.AppendSwitchASCII(
1546 switches::kGpuDriverBugWorkarounds, 1548 switches::kGpuDriverBugWorkarounds,
1547 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); 1549 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED));
1548 SetupInitExpectationsWithCommandLine( 1550 SetupInitExpectationsWithCommandLine(
1549 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", 1551 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced",
1550 command_line); 1552 command_line);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); 1664 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT));
1663 } 1665 }
1664 1666
1665 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { 1667 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
1666 SetupInitExpectations("GL_APPLE_ycbcr_422"); 1668 SetupInitExpectations("GL_APPLE_ycbcr_422");
1667 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); 1669 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
1668 } 1670 }
1669 1671
1670 } // namespace gles2 1672 } // namespace gles2
1671 } // namespace gpu 1673 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698