| OLD | NEW |
| 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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 EXPECT_TRUE( | 1305 EXPECT_TRUE( |
| 1306 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); | 1306 info_->validators()->texture_internal_format.IsValid(GL_DEPTH_STENCIL)); |
| 1307 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); | 1307 EXPECT_TRUE(info_->validators()->texture_format.IsValid(GL_DEPTH_STENCIL)); |
| 1308 EXPECT_TRUE(info_->feature_flags().npot_ok); | 1308 EXPECT_TRUE(info_->feature_flags().npot_ok); |
| 1309 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); | 1309 EXPECT_TRUE(info_->feature_flags().native_vertex_array_object); |
| 1310 EXPECT_TRUE(info_->feature_flags().enable_samplers); | 1310 EXPECT_TRUE(info_->feature_flags().enable_samplers); |
| 1311 EXPECT_TRUE(info_->feature_flags().map_buffer_range); | 1311 EXPECT_TRUE(info_->feature_flags().map_buffer_range); |
| 1312 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer); | 1312 EXPECT_TRUE(info_->feature_flags().ext_discard_framebuffer); |
| 1313 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer")); | 1313 EXPECT_THAT(info_->extensions(), HasSubstr("GL_EXT_discard_framebuffer")); |
| 1314 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); | 1314 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| 1315 EXPECT_TRUE(gfx::GLFence::IsSupported()); | 1315 EXPECT_TRUE(gl::GLFence::IsSupported()); |
| 1316 } | 1316 } |
| 1317 | 1317 |
| 1318 TEST_P(FeatureInfoTest, InitializeWithoutSamplers) { | 1318 TEST_P(FeatureInfoTest, InitializeWithoutSamplers) { |
| 1319 SetupInitExpectationsWithGLVersion("", "", "3.0"); | 1319 SetupInitExpectationsWithGLVersion("", "", "3.0"); |
| 1320 EXPECT_FALSE(info_->feature_flags().enable_samplers); | 1320 EXPECT_FALSE(info_->feature_flags().enable_samplers); |
| 1321 } | 1321 } |
| 1322 | 1322 |
| 1323 TEST_P(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { | 1323 TEST_P(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { |
| 1324 base::CommandLine command_line(0, NULL); | 1324 base::CommandLine command_line(0, NULL); |
| 1325 command_line.AppendSwitchASCII( | 1325 command_line.AppendSwitchASCII( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1340 // Workarounds should get parsed without the need for a context. | 1340 // Workarounds should get parsed without the need for a context. |
| 1341 SetupWithCommandLine(command_line); | 1341 SetupWithCommandLine(command_line); |
| 1342 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); | 1342 EXPECT_TRUE(info_->workarounds().exit_on_context_lost); |
| 1343 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); | 1343 EXPECT_EQ(1024, info_->workarounds().max_cube_map_texture_size); |
| 1344 EXPECT_EQ(4096, info_->workarounds().max_texture_size); | 1344 EXPECT_EQ(4096, info_->workarounds().max_texture_size); |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 TEST_P(FeatureInfoTest, InitializeWithARBSync) { | 1347 TEST_P(FeatureInfoTest, InitializeWithARBSync) { |
| 1348 SetupInitExpectations("GL_ARB_sync"); | 1348 SetupInitExpectations("GL_ARB_sync"); |
| 1349 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); | 1349 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| 1350 EXPECT_TRUE(gfx::GLFence::IsSupported()); | 1350 EXPECT_TRUE(gl::GLFence::IsSupported()); |
| 1351 } | 1351 } |
| 1352 | 1352 |
| 1353 TEST_P(FeatureInfoTest, InitializeWithNVFence) { | 1353 TEST_P(FeatureInfoTest, InitializeWithNVFence) { |
| 1354 SetupInitExpectations("GL_NV_fence"); | 1354 SetupInitExpectations("GL_NV_fence"); |
| 1355 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); | 1355 EXPECT_TRUE(info_->feature_flags().chromium_sync_query); |
| 1356 EXPECT_TRUE(gfx::GLFence::IsSupported()); | 1356 EXPECT_TRUE(gl::GLFence::IsSupported()); |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) { | 1359 TEST_P(FeatureInfoTest, InitializeWithNVDrawBuffers) { |
| 1360 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0"); | 1360 SetupInitExpectationsWithGLVersion("GL_NV_draw_buffers", "", "OpenGL ES 3.0"); |
| 1361 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers); | 1361 EXPECT_TRUE(info_->feature_flags().nv_draw_buffers); |
| 1362 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers); | 1362 EXPECT_TRUE(info_->feature_flags().ext_draw_buffers); |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) { | 1365 TEST_P(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) { |
| 1366 SetupInitExpectationsWithGLVersion( | 1366 SetupInitExpectationsWithGLVersion( |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); | 1491 EXPECT_TRUE(info_->validators()->render_buffer_format.IsValid(GL_RG8_EXT)); |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { | 1494 TEST_P(FeatureInfoTest, InitializeCHROMIUM_ycbcr_422_imageTrue) { |
| 1495 SetupInitExpectations("GL_APPLE_ycbcr_422"); | 1495 SetupInitExpectations("GL_APPLE_ycbcr_422"); |
| 1496 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); | 1496 EXPECT_TRUE(info_->feature_flags().chromium_image_ycbcr_422); |
| 1497 } | 1497 } |
| 1498 | 1498 |
| 1499 } // namespace gles2 | 1499 } // namespace gles2 |
| 1500 } // namespace gpu | 1500 } // namespace gpu |
| OLD | NEW |