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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // DO NOT EDIT! | 7 // DO NOT EDIT! |
8 | 8 |
9 // This file is included by gles2_implementation.h to declare the | 9 // This file is included by gles2_implementation.h to declare the |
10 // GL api functions. | 10 // GL api functions. |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 TEST_F(GLES2ImplementationTest, BindBuffer) { | 27 TEST_F(GLES2ImplementationTest, BindBuffer) { |
28 struct Cmds { | 28 struct Cmds { |
29 BindBuffer cmd; | 29 BindBuffer cmd; |
30 }; | 30 }; |
31 Cmds expected; | 31 Cmds expected; |
32 expected.cmd.Init(GL_ARRAY_BUFFER, 2); | 32 expected.cmd.Init(GL_ARRAY_BUFFER, 2); |
33 | 33 |
34 gl_->BindBuffer(GL_ARRAY_BUFFER, 2); | 34 gl_->BindBuffer(GL_ARRAY_BUFFER, 2); |
35 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 35 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 36 ClearCommands(); |
| 37 gl_->BindBuffer(GL_ARRAY_BUFFER, 2); |
| 38 EXPECT_TRUE(NoCommandsWritten()); |
36 } | 39 } |
37 | 40 |
38 TEST_F(GLES2ImplementationTest, BindFramebuffer) { | 41 TEST_F(GLES2ImplementationTest, BindFramebuffer) { |
39 struct Cmds { | 42 struct Cmds { |
40 BindFramebuffer cmd; | 43 BindFramebuffer cmd; |
41 }; | 44 }; |
42 Cmds expected; | 45 Cmds expected; |
43 expected.cmd.Init(GL_FRAMEBUFFER, 2); | 46 expected.cmd.Init(GL_FRAMEBUFFER, 2); |
44 | 47 |
45 gl_->BindFramebuffer(GL_FRAMEBUFFER, 2); | 48 gl_->BindFramebuffer(GL_FRAMEBUFFER, 2); |
46 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 49 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 50 ClearCommands(); |
| 51 gl_->BindFramebuffer(GL_FRAMEBUFFER, 2); |
| 52 EXPECT_TRUE(NoCommandsWritten()); |
47 } | 53 } |
48 | 54 |
49 TEST_F(GLES2ImplementationTest, BindRenderbuffer) { | 55 TEST_F(GLES2ImplementationTest, BindRenderbuffer) { |
50 struct Cmds { | 56 struct Cmds { |
51 BindRenderbuffer cmd; | 57 BindRenderbuffer cmd; |
52 }; | 58 }; |
53 Cmds expected; | 59 Cmds expected; |
54 expected.cmd.Init(GL_RENDERBUFFER, 2); | 60 expected.cmd.Init(GL_RENDERBUFFER, 2); |
55 | 61 |
56 gl_->BindRenderbuffer(GL_RENDERBUFFER, 2); | 62 gl_->BindRenderbuffer(GL_RENDERBUFFER, 2); |
57 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 63 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 64 ClearCommands(); |
| 65 gl_->BindRenderbuffer(GL_RENDERBUFFER, 2); |
| 66 EXPECT_TRUE(NoCommandsWritten()); |
58 } | 67 } |
59 | 68 |
60 TEST_F(GLES2ImplementationTest, BindTexture) { | 69 TEST_F(GLES2ImplementationTest, BindTexture) { |
61 struct Cmds { | 70 struct Cmds { |
62 BindTexture cmd; | 71 BindTexture cmd; |
63 }; | 72 }; |
64 Cmds expected; | 73 Cmds expected; |
65 expected.cmd.Init(GL_TEXTURE_2D, 2); | 74 expected.cmd.Init(GL_TEXTURE_2D, 2); |
66 | 75 |
67 gl_->BindTexture(GL_TEXTURE_2D, 2); | 76 gl_->BindTexture(GL_TEXTURE_2D, 2); |
68 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 77 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 78 ClearCommands(); |
| 79 gl_->BindTexture(GL_TEXTURE_2D, 2); |
| 80 EXPECT_TRUE(NoCommandsWritten()); |
69 } | 81 } |
70 | 82 |
71 TEST_F(GLES2ImplementationTest, BlendColor) { | 83 TEST_F(GLES2ImplementationTest, BlendColor) { |
72 struct Cmds { | 84 struct Cmds { |
73 BlendColor cmd; | 85 BlendColor cmd; |
74 }; | 86 }; |
75 Cmds expected; | 87 Cmds expected; |
76 expected.cmd.Init(1, 2, 3, 4); | 88 expected.cmd.Init(1, 2, 3, 4); |
77 | 89 |
78 gl_->BlendColor(1, 2, 3, 4); | 90 gl_->BlendColor(1, 2, 3, 4); |
79 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 91 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
80 } | 92 } |
81 | 93 |
82 TEST_F(GLES2ImplementationTest, BlendEquation) { | 94 TEST_F(GLES2ImplementationTest, BlendEquation) { |
83 struct Cmds { | 95 struct Cmds { |
84 BlendEquation cmd; | 96 BlendEquation cmd; |
85 }; | 97 }; |
86 Cmds expected; | 98 Cmds expected; |
87 expected.cmd.Init(GL_FUNC_ADD); | 99 expected.cmd.Init(GL_FUNC_SUBTRACT); |
88 | 100 |
89 gl_->BlendEquation(GL_FUNC_ADD); | 101 gl_->BlendEquation(GL_FUNC_SUBTRACT); |
90 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 102 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
91 } | 103 } |
92 | 104 |
93 TEST_F(GLES2ImplementationTest, BlendEquationSeparate) { | 105 TEST_F(GLES2ImplementationTest, BlendEquationSeparate) { |
94 struct Cmds { | 106 struct Cmds { |
95 BlendEquationSeparate cmd; | 107 BlendEquationSeparate cmd; |
96 }; | 108 }; |
97 Cmds expected; | 109 Cmds expected; |
98 expected.cmd.Init(GL_FUNC_ADD, GL_FUNC_ADD); | 110 expected.cmd.Init(GL_FUNC_SUBTRACT, GL_FUNC_ADD); |
99 | 111 |
100 gl_->BlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD); | 112 gl_->BlendEquationSeparate(GL_FUNC_SUBTRACT, GL_FUNC_ADD); |
101 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 113 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
102 } | 114 } |
103 | 115 |
104 TEST_F(GLES2ImplementationTest, BlendFunc) { | 116 TEST_F(GLES2ImplementationTest, BlendFunc) { |
105 struct Cmds { | 117 struct Cmds { |
106 BlendFunc cmd; | 118 BlendFunc cmd; |
107 }; | 119 }; |
108 Cmds expected; | 120 Cmds expected; |
109 expected.cmd.Init(GL_ZERO, GL_ZERO); | 121 expected.cmd.Init(GL_ZERO, GL_ZERO); |
110 | 122 |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 struct Cmds { | 371 struct Cmds { |
360 DetachShader cmd; | 372 DetachShader cmd; |
361 }; | 373 }; |
362 Cmds expected; | 374 Cmds expected; |
363 expected.cmd.Init(1, 2); | 375 expected.cmd.Init(1, 2); |
364 | 376 |
365 gl_->DetachShader(1, 2); | 377 gl_->DetachShader(1, 2); |
366 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 378 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
367 } | 379 } |
368 | 380 |
369 TEST_F(GLES2ImplementationTest, Disable) { | |
370 struct Cmds { | |
371 Disable cmd; | |
372 }; | |
373 Cmds expected; | |
374 expected.cmd.Init(GL_BLEND); | |
375 | |
376 gl_->Disable(GL_BLEND); | |
377 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | |
378 } | |
379 | |
380 TEST_F(GLES2ImplementationTest, DisableVertexAttribArray) { | 381 TEST_F(GLES2ImplementationTest, DisableVertexAttribArray) { |
381 struct Cmds { | 382 struct Cmds { |
382 DisableVertexAttribArray cmd; | 383 DisableVertexAttribArray cmd; |
383 }; | 384 }; |
384 Cmds expected; | 385 Cmds expected; |
385 expected.cmd.Init(1); | 386 expected.cmd.Init(1); |
386 | 387 |
387 gl_->DisableVertexAttribArray(1); | 388 gl_->DisableVertexAttribArray(1); |
388 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 389 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
389 } | 390 } |
390 | 391 |
391 TEST_F(GLES2ImplementationTest, DrawArrays) { | 392 TEST_F(GLES2ImplementationTest, DrawArrays) { |
392 struct Cmds { | 393 struct Cmds { |
393 DrawArrays cmd; | 394 DrawArrays cmd; |
394 }; | 395 }; |
395 Cmds expected; | 396 Cmds expected; |
396 expected.cmd.Init(GL_POINTS, 2, 3); | 397 expected.cmd.Init(GL_POINTS, 2, 3); |
397 | 398 |
398 gl_->DrawArrays(GL_POINTS, 2, 3); | 399 gl_->DrawArrays(GL_POINTS, 2, 3); |
399 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 400 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
400 } | 401 } |
401 | 402 |
402 TEST_F(GLES2ImplementationTest, Enable) { | |
403 struct Cmds { | |
404 Enable cmd; | |
405 }; | |
406 Cmds expected; | |
407 expected.cmd.Init(GL_BLEND); | |
408 | |
409 gl_->Enable(GL_BLEND); | |
410 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | |
411 } | |
412 | |
413 TEST_F(GLES2ImplementationTest, EnableVertexAttribArray) { | 403 TEST_F(GLES2ImplementationTest, EnableVertexAttribArray) { |
414 struct Cmds { | 404 struct Cmds { |
415 EnableVertexAttribArray cmd; | 405 EnableVertexAttribArray cmd; |
416 }; | 406 }; |
417 Cmds expected; | 407 Cmds expected; |
418 expected.cmd.Init(1); | 408 expected.cmd.Init(1); |
419 | 409 |
420 gl_->EnableVertexAttribArray(1); | 410 gl_->EnableVertexAttribArray(1); |
421 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 411 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
422 } | 412 } |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 | 1033 |
1044 gl_->StencilMaskSeparate(GL_FRONT, 2); | 1034 gl_->StencilMaskSeparate(GL_FRONT, 2); |
1045 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1035 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
1046 } | 1036 } |
1047 | 1037 |
1048 TEST_F(GLES2ImplementationTest, StencilOp) { | 1038 TEST_F(GLES2ImplementationTest, StencilOp) { |
1049 struct Cmds { | 1039 struct Cmds { |
1050 StencilOp cmd; | 1040 StencilOp cmd; |
1051 }; | 1041 }; |
1052 Cmds expected; | 1042 Cmds expected; |
1053 expected.cmd.Init(GL_KEEP, GL_KEEP, GL_KEEP); | 1043 expected.cmd.Init(GL_KEEP, GL_INCR, GL_KEEP); |
1054 | 1044 |
1055 gl_->StencilOp(GL_KEEP, GL_KEEP, GL_KEEP); | 1045 gl_->StencilOp(GL_KEEP, GL_INCR, GL_KEEP); |
1056 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1046 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
1057 } | 1047 } |
1058 | 1048 |
1059 TEST_F(GLES2ImplementationTest, StencilOpSeparate) { | 1049 TEST_F(GLES2ImplementationTest, StencilOpSeparate) { |
1060 struct Cmds { | 1050 struct Cmds { |
1061 StencilOpSeparate cmd; | 1051 StencilOpSeparate cmd; |
1062 }; | 1052 }; |
1063 Cmds expected; | 1053 Cmds expected; |
1064 expected.cmd.Init(GL_FRONT, GL_KEEP, GL_KEEP, GL_KEEP); | 1054 expected.cmd.Init(GL_FRONT, GL_INCR, GL_KEEP, GL_KEEP); |
1065 | 1055 |
1066 gl_->StencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, GL_KEEP); | 1056 gl_->StencilOpSeparate(GL_FRONT, GL_INCR, GL_KEEP, GL_KEEP); |
1067 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1057 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
1068 } | 1058 } |
1069 | 1059 |
1070 TEST_F(GLES2ImplementationTest, TexParameterf) { | 1060 TEST_F(GLES2ImplementationTest, TexParameterf) { |
1071 struct Cmds { | 1061 struct Cmds { |
1072 TexParameterf cmd; | 1062 TexParameterf cmd; |
1073 }; | 1063 }; |
1074 Cmds expected; | 1064 Cmds expected; |
1075 expected.cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 3); | 1065 expected.cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 3); |
1076 | 1066 |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 | 1650 |
1661 TEST_F(GLES2ImplementationTest, BindVertexArrayOES) { | 1651 TEST_F(GLES2ImplementationTest, BindVertexArrayOES) { |
1662 struct Cmds { | 1652 struct Cmds { |
1663 BindVertexArrayOES cmd; | 1653 BindVertexArrayOES cmd; |
1664 }; | 1654 }; |
1665 Cmds expected; | 1655 Cmds expected; |
1666 expected.cmd.Init(1); | 1656 expected.cmd.Init(1); |
1667 | 1657 |
1668 gl_->BindVertexArrayOES(1); | 1658 gl_->BindVertexArrayOES(1); |
1669 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1659 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1660 ClearCommands(); |
| 1661 gl_->BindVertexArrayOES(1); |
| 1662 EXPECT_TRUE(NoCommandsWritten()); |
1670 } | 1663 } |
1671 // TODO: Implement unit test for GenSharedIdsCHROMIUM | 1664 // TODO: Implement unit test for GenSharedIdsCHROMIUM |
1672 // TODO: Implement unit test for DeleteSharedIdsCHROMIUM | 1665 // TODO: Implement unit test for DeleteSharedIdsCHROMIUM |
1673 // TODO: Implement unit test for RegisterSharedIdsCHROMIUM | 1666 // TODO: Implement unit test for RegisterSharedIdsCHROMIUM |
1674 // TODO: Implement unit test for EnableFeatureCHROMIUM | 1667 // TODO: Implement unit test for EnableFeatureCHROMIUM |
1675 | 1668 |
1676 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) { | 1669 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) { |
1677 struct Cmds { | 1670 struct Cmds { |
1678 ResizeCHROMIUM cmd; | 1671 ResizeCHROMIUM cmd; |
1679 }; | 1672 }; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1788 ReleaseTexImage2DCHROMIUM cmd; | 1781 ReleaseTexImage2DCHROMIUM cmd; |
1789 }; | 1782 }; |
1790 Cmds expected; | 1783 Cmds expected; |
1791 expected.cmd.Init(GL_TEXTURE_2D, 2); | 1784 expected.cmd.Init(GL_TEXTURE_2D, 2); |
1792 | 1785 |
1793 gl_->ReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, 2); | 1786 gl_->ReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, 2); |
1794 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1787 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
1795 } | 1788 } |
1796 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 1789 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
1797 | 1790 |
OLD | NEW |