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/test_helper.h" | 5 #include "gpu/command_buffer/service/test_helper.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 gl_info.is_es3 || gl_info.is_desktop_core_profile) { | 358 gl_info.is_es3 || gl_info.is_desktop_core_profile) { |
359 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_SAMPLES, _)) | 359 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_SAMPLES, _)) |
360 .WillOnce(SetArgumentPointee<1>(kMaxSamples)) | 360 .WillOnce(SetArgumentPointee<1>(kMaxSamples)) |
361 .RetiresOnSaturation(); | 361 .RetiresOnSaturation(); |
362 } else if (strstr(extensions, "GL_IMG_multisampled_render_to_texture")) { | 362 } else if (strstr(extensions, "GL_IMG_multisampled_render_to_texture")) { |
363 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_SAMPLES_IMG, _)) | 363 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_SAMPLES_IMG, _)) |
364 .WillOnce(SetArgumentPointee<1>(kMaxSamples)) | 364 .WillOnce(SetArgumentPointee<1>(kMaxSamples)) |
365 .RetiresOnSaturation(); | 365 .RetiresOnSaturation(); |
366 } | 366 } |
367 | 367 |
368 if (enable_es3 || strstr(extensions, "GL_ARB_draw_buffers") || | 368 if (strstr(extensions, "GL_EXT_draw_buffers") || |
369 strstr(extensions, "GL_EXT_draw_buffers") || gl_info.is_es3 || | 369 strstr(extensions, "GL_ARB_draw_buffers") || |
| 370 (gl_info.is_es3 && strstr(extensions, "GL_NV_draw_buffers")) || |
370 gl_info.is_desktop_core_profile) { | 371 gl_info.is_desktop_core_profile) { |
371 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) | 372 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) |
372 .WillOnce(SetArgumentPointee<1>(8)) | 373 .WillOnce(SetArgumentPointee<1>(8)) |
373 .RetiresOnSaturation(); | 374 .RetiresOnSaturation(); |
374 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, _)) | 375 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, _)) |
375 .WillOnce(SetArgumentPointee<1>(8)) | 376 .WillOnce(SetArgumentPointee<1>(8)) |
376 .RetiresOnSaturation(); | 377 .RetiresOnSaturation(); |
377 } | 378 } |
378 | 379 |
379 if (gl_info.IsAtLeastGL(3, 3) || | 380 if (gl_info.IsAtLeastGL(3, 3) || |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) | 649 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) |
649 .Times(1) | 650 .Times(1) |
650 .RetiresOnSaturation(); | 651 .RetiresOnSaturation(); |
651 #if DCHECK_IS_ON() | 652 #if DCHECK_IS_ON() |
652 EXPECT_CALL(*gl, GetError()) | 653 EXPECT_CALL(*gl, GetError()) |
653 .WillOnce(Return(GL_NO_ERROR)) | 654 .WillOnce(Return(GL_NO_ERROR)) |
654 .RetiresOnSaturation(); | 655 .RetiresOnSaturation(); |
655 #endif | 656 #endif |
656 } | 657 } |
657 | 658 |
658 if (enable_es3 || strstr(extensions, "GL_ARB_draw_buffers") || | 659 if (strstr(extensions, "GL_EXT_draw_buffers") || |
659 strstr(extensions, "GL_EXT_draw_buffers") || gl_info.is_es3 || | 660 strstr(extensions, "GL_ARB_draw_buffers") || |
| 661 (gl_info.is_es3 && strstr(extensions, "GL_NV_draw_buffers")) || |
660 gl_info.is_desktop_core_profile) { | 662 gl_info.is_desktop_core_profile) { |
661 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) | 663 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) |
662 .WillOnce(SetArgumentPointee<1>(8)) | 664 .WillOnce(SetArgumentPointee<1>(8)) |
663 .RetiresOnSaturation(); | 665 .RetiresOnSaturation(); |
664 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, _)) | 666 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, _)) |
665 .WillOnce(SetArgumentPointee<1>(8)) | 667 .WillOnce(SetArgumentPointee<1>(8)) |
666 .RetiresOnSaturation(); | 668 .RetiresOnSaturation(); |
667 } | 669 } |
668 | 670 |
669 if (gl_info.is_es3 || gl_info.is_desktop_core_profile || | 671 if (gl_info.is_es3 || gl_info.is_desktop_core_profile || |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 GLenum precision, | 1204 GLenum precision, |
1203 bool static_use, | 1205 bool static_use, |
1204 const std::string& name) { | 1206 const std::string& name) { |
1205 return ConstructShaderVariable<sh::OutputVariable>( | 1207 return ConstructShaderVariable<sh::OutputVariable>( |
1206 type, array_size, precision, static_use, name); | 1208 type, array_size, precision, static_use, name); |
1207 } | 1209 } |
1208 | 1210 |
1209 } // namespace gles2 | 1211 } // namespace gles2 |
1210 } // namespace gpu | 1212 } // namespace gpu |
1211 | 1213 |
OLD | NEW |