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

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

Issue 2696333002: Revert of Fix EXT_draw_buffers detection on some GL ES 3 contexts (Closed)
Patch Set: 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 EXPECT_FALSE(info_->feature_flags().angle_instanced_arrays); 203 EXPECT_FALSE(info_->feature_flags().angle_instanced_arrays);
204 EXPECT_FALSE(info_->feature_flags().occlusion_query_boolean); 204 EXPECT_FALSE(info_->feature_flags().occlusion_query_boolean);
205 EXPECT_FALSE(info_->feature_flags( 205 EXPECT_FALSE(info_->feature_flags(
206 ).use_arb_occlusion_query2_for_occlusion_query_boolean); 206 ).use_arb_occlusion_query2_for_occlusion_query_boolean);
207 EXPECT_FALSE(info_->feature_flags( 207 EXPECT_FALSE(info_->feature_flags(
208 ).use_arb_occlusion_query_for_occlusion_query_boolean); 208 ).use_arb_occlusion_query_for_occlusion_query_boolean);
209 EXPECT_FALSE(info_->feature_flags().native_vertex_array_object); 209 EXPECT_FALSE(info_->feature_flags().native_vertex_array_object);
210 EXPECT_FALSE(info_->feature_flags().map_buffer_range); 210 EXPECT_FALSE(info_->feature_flags().map_buffer_range);
211 EXPECT_FALSE(info_->feature_flags().use_async_readpixels); 211 EXPECT_FALSE(info_->feature_flags().use_async_readpixels);
212 EXPECT_FALSE(info_->feature_flags().ext_draw_buffers); 212 EXPECT_FALSE(info_->feature_flags().ext_draw_buffers);
213 EXPECT_FALSE(info_->feature_flags().nv_draw_buffers);
213 EXPECT_FALSE(info_->feature_flags().ext_discard_framebuffer); 214 EXPECT_FALSE(info_->feature_flags().ext_discard_framebuffer);
214 EXPECT_FALSE(info_->feature_flags().angle_depth_texture); 215 EXPECT_FALSE(info_->feature_flags().angle_depth_texture);
215 EXPECT_FALSE(info_->feature_flags().ext_read_format_bgra); 216 EXPECT_FALSE(info_->feature_flags().ext_read_format_bgra);
216 217
217 #define GPU_OP(type, name) EXPECT_FALSE(info_->workarounds().name); 218 #define GPU_OP(type, name) EXPECT_FALSE(info_->workarounds().name);
218 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) 219 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
219 #undef GPU_OP 220 #undef GPU_OP
220 EXPECT_EQ(0, info_->workarounds().max_texture_size); 221 EXPECT_EQ(0, info_->workarounds().max_texture_size);
221 EXPECT_FALSE(info_->workarounds().gl_clear_broken); 222 EXPECT_FALSE(info_->workarounds().gl_clear_broken);
222 } 223 }
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); 1459 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL));
1459 EXPECT_FALSE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); 1460 EXPECT_FALSE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL));
1460 EXPECT_TRUE(info_->feature_flags().npot_ok); 1461 EXPECT_TRUE(info_->feature_flags().npot_ok);
1461 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); 1462 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object);
1462 EXPECT_TRUE(info_->feature_flags().enable_samplers); 1463 EXPECT_TRUE(info_->feature_flags().enable_samplers);
1463 EXPECT_TRUE(info_->feature_flags().map_buffer_range); 1464 EXPECT_TRUE(info_->feature_flags().map_buffer_range);
1464 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer); 1465 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer);
1465 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer")); 1466 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer"));
1466 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1467 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1467 EXPECT_TRUE(gl::GLFence::IsSupported()); 1468 EXPECT_TRUE(gl::GLFence::IsSupported());
1468 EXPECT_EQ(GetContextType() == CONTEXT_TYPE_OPENGLES2,
1469 info_->feature_flags().ext_draw_buffers);
1470 } 1469 }
1471 1470
1472 TEST_P(FeatureInfoTest, InitializeWithES3AndDepthTexture) { 1471 TEST_P(FeatureInfoTest, InitializeWithES3AndDepthTexture) {
1473 SetupInitExpectationsWithGLVersion( 1472 SetupInitExpectationsWithGLVersion(
1474 "GL_ANGLE_depth_texture", "", "OpenGL ES 3.0"); 1473 "GL_ANGLE_depth_texture", "", "OpenGL ES 3.0");
1475 EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture")); 1474 EXPECT_THAT(info_->extensions(), HasSubstr("GL_GOOGLE_depth_texture"));
1476 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_depth_texture")); 1475 EXPECT_THAT(info_->extensions(), HasSubstr("GL_CHROMIUM_depth_texture"));
1477 EXPECT_TRUE( 1476 EXPECT_TRUE(
1478 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_COMPONENT)); 1477 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_COMPONENT));
1479 EXPECT_TRUE( 1478 EXPECT_TRUE(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1520 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1522 EXPECT_TRUE(gl::GLFence::IsSupported()); 1521 EXPECT_TRUE(gl::GLFence::IsSupported());
1523 } 1522 }
1524 1523
1525 TEST_P(FeatureInfoTest, InitializeWithNVFence) { 1524 TEST_P(FeatureInfoTest, InitializeWithNVFence) {
1526 SetupInitExpectations("GL_NV_fence"); 1525 SetupInitExpectations("GL_NV_fence");
1527 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); 1526 EXPECT_TRUE(info_->feature_flags().chromium_sync_query);
1528 EXPECT_TRUE(gl::GLFence::IsSupported()); 1527 EXPECT_TRUE(gl::GLFence::IsSupported());
1529 } 1528 }
1530 1529
1530 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) {
1531 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0");
1532 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers);
1533 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers);
1534 }
1535
1536 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) {
1537 SetupInitExpectationsWithGLVersion(
1538 "GL_NV_draw_buffers GL_EXT_draw_buffers", "", "OpenGL ES 3.0");
1539 EXPECT_FALSE(info_->feature_flags().nv_draw_buffers);
1540 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers);
1541 }
1542
1531 TEST_P(FeatureInfoTest, BlendEquationAdvancedDisabled) { 1543 TEST_P(FeatureInfoTest, BlendEquationAdvancedDisabled) {
1532 base::CommandLine command_line(0, NULL); 1544 base::CommandLine command_line(0, NULL);
1533 command_line.AppendSwitchASCII( 1545 command_line.AppendSwitchASCII(
1534 switches::kGpuDriverBugWorkarounds, 1546 switches::kGpuDriverBugWorkarounds,
1535 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); 1547 base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED));
1536 SetupInitExpectationsWithCommandLine( 1548 SetupInitExpectationsWithCommandLine(
1537 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", 1549 "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced",
1538 command_line); 1550 command_line);
1539 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); 1551 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced);
1540 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent); 1552 EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); 1662 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT));
1651 } 1663 }
1652 1664
1653 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { 1665 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) {
1654 SetupInitExpectations("GL_APPLE_ycbcr_422"); 1666 SetupInitExpectations("GL_APPLE_ycbcr_422");
1655 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); 1667 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422);
1656 } 1668 }
1657 1669
1658 } // namespace gles2 1670 } // namespace gles2
1659 } // namespace gpu 1671 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698